Unix/Linux Forum: Which is the parent and child process in following command? - Unix/Linux Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Which is the parent and child process in following command? Rate Topic: -----

#1 User is offline   brownaryan 

  • Newbie (User Level: 0/10)
  • Group: Members
  • Posts: 5
  • Joined: 13-June 08

Posted 29 June 2008 - 07:11 PM

Which is the parent and child process in following command?

$ ls -l | wc -l

Regards

Brownaryan
www.unixhelpline.blogspot.com
0

#2 User is offline   vibhor_agarwalin 

  • User Level: 7/10
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 574
  • Joined: 24-June 05

Posted 30 June 2008 - 11:23 AM

Parent is the shell in which you are running.

ls & wc will be short lived child of the above.
Vibhor Kumar Agarwal
0

#3 User is offline   eggi 

  • User Level: 6/10
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 311
  • Joined: 25-November 07
  • Location:Grayslake, IL USA

Posted 01 July 2008 - 04:36 AM

Hey There,

Another way of looking at is that any process spawned by another process is the child of that process (textbook, I know ;) As stated above, for pipelines, there's not distinct parent-child relationship between the elements in the pipe, no matter how long the pipe is, as they're all children of the process spawning the pipe (the shell)

What he said, probably ;)

Cheers,

Mike
The greatest viral marketing idea of all time, get your copy of this Free Report now!
----
Linux Tips, Trick and Advice -- The Linux and Unix Menagerie
0

#4 User is offline   vibhor_agarwalin 

  • User Level: 7/10
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 574
  • Joined: 24-June 05

Posted 01 July 2008 - 06:13 AM

lol
Vibhor Kumar Agarwal
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users