Welcome to the Linux Foundation Forum!

Threads doubhts

I have few doubhts related to threads. Can you please clarify.

1. Is it possible to call fork() inside a thread.

2. Is it possible for a thread to create another thread.

Thanks

Kumar

Comments

  • Posts: 501
    1. Yes, but you may have some issues with file descriptors and/or sockets that are in use in the forked copy. However, if you are going to exec another application after the fork, then fine.
    2. Yes. After all, you can consider the main application as being a thread itself.
  • Posts: 182
    both things are possible kumar :-)

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training