funit-exec (8) - Linux Manuals

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

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/lib/frysk/funit-exec \
    /usr/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/lib/frysk/funit-exec -c 1 -s 1 -p $$ \
    -e /bin/echo arg0 arg1

BUGS

Report bugs to m[blue]http:/sources.redhat.com/fryskm[]

SEE ALSO

frysk(7) funit(8)