[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with the time command
From: |
Paul Eggert |
Subject: |
Re: problem with the time command |
Date: |
Wed, 01 Sep 2004 22:09:39 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
"Link, Andreas" <address@hidden> writes:
> If I execute the command 'time myprogram -myoption' with a fork routine,
> e.g. in a perl program, I get the process ID of the 'time' command, but
> not the process ID of the 'myprogram' command. Is it possible to get the
> process ID of the 'myprogram' command for example by reading a
> environmant variable?
You can do something like this:
time sh -c 'echo $$ && exec myprogram -myoption'
This will output the process-ID of your subprogram before executing it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: problem with the time command,
Paul Eggert <=