Re: How to get the child process pid ?
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 11/20/03
- Previous message: joe durusau: "Re: C Compiler (same message in btintra.unix)"
- In reply to: pthomsin: "How to get the child process pid ?"
- Next in thread: pthomsin: "Re: How to get the child process pid ?"
- Reply: pthomsin: "Re: How to get the child process pid ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 Nov 2003 16:02:48 GMT
In article <5cc87ce9.0311200615.39f161ba@posting.google.com>,
pthomsin <pthomsin@yahoo.com> wrote:
>I would like to find an (easy) way to automatically get the process id
>of the latest child process of a user per tty. (the process that he
>currently executes in each terminal)
>I looked in the man ps, and did not see any option about it.
>I found pgrep -lnu [username] , but this shows only the most recent
>process among all (if several sessions of the same user)
>Same for pstree ...
Try the "w" command.
-- Barry Margolin, barmar@alum.mit.edu Level(3), Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
- Previous message: joe durusau: "Re: C Compiler (same message in btintra.unix)"
- In reply to: pthomsin: "How to get the child process pid ?"
- Next in thread: pthomsin: "Re: How to get the child process pid ?"
- Reply: pthomsin: "Re: How to get the child process pid ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|