On Mon, Feb 14, 2005 at 11:36:06AM +0000 or thereabouts, Kostas Georgiou wrote:
> I had a look at pbs last week and it doesn't seem to
> cleanup after itself correctly. The following program
> will continue running after the pbs job is finished
> (only tested at imperial) which opens a few interesting
> possibilities. Since pbs doesn't know about the job there
> is no accounting and whats probably worst the pool
> account is considered "free" now so the job can start
> interfering with the next jobs that will end in the node.
>
> Any ideas on how to handle this? How can you find out
> who started the job if the pool account is reused?
I would submit it to the torque bugzilla, clearly a big hole it
PBS.
I'll test your code out later here.
Steve
>
> Kostas
>
>
> #include <sys/types.h>
> #include <unistd.h>
>
> int main(int argc, char **argv) {
> pid_t p = fork();
> if (p == (pid_t) -1) {
> exit(0); /* we failed.... */
> } else if (p == 0) { /* CHILD */
> setsid(); /* new session */
> setpgid(0, 0);
> } else { /* PARENT */
> exit(0);
> }
>
> /* Do something usefull here */
> sleep(6000);
> }
>
--
Steve Traylen
[log in to unmask]
http://www.gridpp.ac.uk/
|