Re: Forground process and background process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I dont think the kernel makes any distinction between foreground or background processes. Its just something that it maintained by the shell. When you run a program in the background by ./program &, you are telling the shell to fork and exec the program but not to wait() on it and return. Now, when you use the jobs command to see the background processes, i believe the shell looks up its internal structures to find out what processes it started in the background. jobs is a built-in shell command.

Oh yeah, the shell also detaches the background process from a terminal ( so hitting a Ctrl-C will not send a signal to it).

Regards,
Bijoy.

On Nov 20, 2004, at 10:41 PM, Manish Regmi wrote:

hi all,
Can anybody tell me how does Linux Kernel identifies between the
background and foreground process?

Thanks in Advance.

--
Manish Regmi

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux