Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-23-2004, 08:52 AM   #1
Lemon Songster
LQ Newbie
Registered: Aug 2001
Location: UK
Distribution: RH7.1 from Linux123
Posts: 7

Rep: Reputation: 0
Angry Can't see process with ps or top

I am using Perl to fork a child process and then use setsid on both processes to make them independent group leaders. It's a very simple command I use to do this...

perl -mPOSIX=setsid -e 'fork;setsid;sleep'

When I do a ps -ef (or top) all I can see is the first process untill I manually kill this one then the child appears.

I've refined it a bit so that now I do...

perl -mPOSIX=setsid -e 'fork;sleep 10;setsid;sleep'

Now when I do a ps -ef I can see both processes for 10 seconds. Then the child process becomes invisible untill I kill the parent, upon which the child process reappears.

At all times I can see the child process directory in /proc. I there some magic switch I've missed on ps?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
top process full path toolshed Linux - Software 7 02-01-2005 04:45 PM
Programs don't like "staying on top" or "always on top" -- any help? SBing Linux - Software 8 07-05-2004 04:41 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM
problem with binding process and than execute another process chapa Programming 0 08-27-2003 03:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration