Name

funit-exec — on CNTRL-C exec the specified program

Synopsis

funit-exec [ OPTION ] { program } [ arg ...]

DESCRIPTION

Wait for a SIGINT (cntrl-c) signal and then exec program passing it args.

Sending a SIGUSR1 signal will cause a random non-main thread to make the exec call.

-m pid

The pid of the master process that should be sent a signal once this program is running (default 0).

-s signal

The signal to send to the master process once this program is running (default 0).

-t timeout

Exit after timeout seconds.

-c count

Create count threads.

-e executable

The executable to exec (default is the program).

-b

Brand the exec with the thread that initiated it by setting argv[0] to the string TID:PID.

program arg...

The program and arguments to pass to the exec call.

This program is used by funit, as part of frysk's JUnit testsuite.

EXAMPLE

Create a 32-bit process that, on cntrl-c (SIGINT), will exec the 64-bit funit-exit program.

/usr/local/lib/frysk/funit-exec \
    /usr/local/lib64/frysk/funit-exec /bin/echo done

Create a process, with one additional thread, signals the shell with SIGUSR1 once it is running, and then execs /bin/echo but with argument zero set to "arg0".

/usr/local/lib/frysk/funit-exec -c 1 -s 1 -p $$ \
    -e /bin/echo arg0 arg1

SEE ALSO

frysk(7) funit(8)

BUGS

Report bugs to http:/sources.redhat.com/frysk