JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Reference Manual     Oracle Solaris Cluster
search filter icon
search icon

Document Information

Preface

Introduction

OSC33 1

OSC33 1cl

OSC33 1ha

OSC33 1m

cconsole(1M)

ccp(1M)

chosts(1M)

cl_eventd(1M)

cl_pnmd(1M)

cports(1M)

crlogin(1M)

cssh(1M)

ctelnet(1M)

halockrun(1M)

hatimerun(1M)

pmfadm(1M)

pmfd(1M)

rpc.pmfd(1M)

scconf(1M)

scconf_dg_rawdisk(1M)

scconf_dg_svm(1M)

scconf_dg_vxvm(1M)

scconf_quorum_dev_netapp_nas(1M)

scconf_quorum_dev_quorum_server(1M)

scconf_quorum_dev_scsi(1M)

scconf_transp_adap_bge(1M)

scconf_transp_adap_ce(1M)

scconf_transp_adap_e1000g(1M)

scconf_transp_adap_eri(1M)

scconf_transp_adap_ge(1M)

scconf_transp_adap_hme(1M)

scconf_transp_adap_ibd(1M)

scconf_transp_adap_qfe(1M)

scconf_transp_jct_etherswitch(1M)

scconf_transp_jct_ibswitch(1M)

scdidadm(1M)

scdpm(1M)

sceventmib(1M)

scgdevs(1M)

scinstall(1M)

scnas(1M)

scnasdir(1M)

scprivipadm(1M)

scprivipd(1M)

scrgadm(1M)

scsetup(1M)

scshutdown(1M)

scsnapshot(1M)

scstat(1M)

scswitch(1M)

sctelemetry(1M)

scversions(1M)

scvxinstall(1M)

sc_zonesd(1M)

OSC33 3ha

OSC33 4

OSC33 5

OSC33 5cl

OSC33 7

OSC33 7p

Index

hatimerun

- run child program under a timeout

Synopsis

/usr/cluster/bin/hatimerun -t timeOutSecs [-av] [-e exitcode]

 prog args
/usr/cluster/bin/hatimerun -t timeOutSecs [-v] [-e exitcode]

 [-k signalname] prog args

Description

The hatimerun utility provides a convenient facility for timing out the execution of another child, program. It is useful when programming in scripting languages, such as the Bourne shell. See sh(1).

The hatimerun utility runs the program prog with arguments args as a child subprocess under a timeout, and as its own process group. The timeout is specified in seconds, by the -t timeOutSecs option. If the timeout expires, then hatimerun kills the child subprocess's process group with a SIGKILL signal, and then exits with exit code 99.

You can run this command in the global zone or in a non-global zone. The command affects only the global or non-global zone in which you issue the command.

Options

The following options are supported:

-a

Changes the meaning of hatimerun radically: instead of killing the child when the timeout expires, the hatimerun utility simply exits, with exit code 99, leaving the child to run asynchronously.

It is illegal to supply both the -a option and the -k option.

-e

Changes the exit code for the timeout case to some other value than 99.

-k

Specifies what signal is used to kill the child process group. The possible signal names are the same as those recognized by the kill(1) command. In particular, the signal name should be one of the symbolic names defined in the <signal.h> description. The signal name is recognized in a case-independent fashion, without the SIG prefix. It is also legal to supply a numeric argument to the -k option, in which case that signal number is used.

It is illegal to supply both the -a option and the -k option.

-t

Specifies the timeout period, in seconds.

-v

Verbose output, on stderr.

Exit Status

If the timeout occurs, then hatimerun exits with exit code 99 (which can be overridden to some other value using the -e option).

If the timeout does not occur but some other error is detected by the hatimerun utility (as opposed to the error being detected by the child program), then hatimerunhatimerun exits with exit code 98.

Otherwise, hatimerun exits with the child's exit status.

The hatimerun utility catches the signal SIGTERM. It responds to the signal by killing the child as if a timeout had occurred, and then exiting with exit code 98.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWscu
Interface Stability
Evolving

See Also

kill(1), sh(1), attributes(5)