shells forking?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
naminator
Posts: 2
Joined: Mon Apr 07, 2008 4:04 pm

shells forking?

Post by naminator »

Hi,

I am reading Tanenbaum's book at the moment on modern operating systems. He is taliking about system calls and he implies that when a command is entered into a shell on a POSIX system, the shell forks a new process. Is this true and if so why?

Thanks
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Post by iammisc »

when you enter into a command in a UNIX shell the shell forks itself and then exec()'s the new program. IIRC this is the only way to start a brand new process on a POSIX system.
naminator
Posts: 2
Joined: Mon Apr 07, 2008 4:04 pm

Post by naminator »

Oh, I see, I didn't think about not being able to create a process any other way, Thanks for your help.
Post Reply