Skip to contentSkip to conversation

global_send_sigint

DISCUSSION Sukadev Bhattiprolu 2 participants 3 messages Feb 25, 2010 – Jan 11, 2011 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

global_send_sigint is -1 by default.

If it is -1, we either send SIGKILL or SIGINIT depending on whether we started "new pidns with init" or "new pidns without init".

If global_send_sigint is explicitly set to 0 by user (--signal is set). no signal is sent.

Given that we are making restart() available in libcheckpoint.a, would it make sense to switch the behaviors of 0 and -1 ?

i.e if global_send_sigint is 0, send the default signal (SIGINT or SIGKILL). If it is -1, then don't send any signal.

That way, applications of restart() (i.e LXC) can simply

	memset(&args, 0, sizeof(args))

and get the default behavior. Now they have to explicitly set to -1.

Sukadev

A message that is not in the archive (sent off-list or not yet received): 20100225034746.GA18829-r/[email protected]

#2 lore raw

At the moment, at least @klogd field has to be set manually.

Perhaps it would be better to provide a pre-initialized struct, so that users could do:

args = CR_RESTART_ARGS;
or
cr_init_restart_args(&args);

?

Oren

Quoted 23 lines · Sukadev Bhattiprolu

global_send_sigint is -1 by default.

If it is -1, we either send SIGKILL or SIGINIT depending on whether we started "new pidns with init" or "new pidns without init".

If global_send_sigint is explicitly set to 0 by user (--signal is set). no signal is sent.

Given that we are making restart() available in libcheckpoint.a, would it make sense to switch the behaviors of 0 and -1 ?

i.e if global_send_sigint is 0, send the default signal (SIGINT or SIGKILL). If it is -1, then don't send any signal.

That way, applications of restart() (i.e LXC) can simply

	memset(&args, 0, sizeof(args))

and get the default behavior. Now they have to explicitly set to -1.

Sukadev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Oren Laadan [[email protected]] wrote:

| 
| At the moment, at least @klogd field has to be set manually.
| 
| Perhaps it would be better to provide a pre-initialized struct,
| so that users could do:
| 
|   args = CR_RESTART_ARGS;
| or
|   cr_init_restart_args(&args);
| 
| ?

Yes, that would be more generalized.

Sukadev