Anti-CtrlC method?

What is a good way to have a QNX4 app running in pterm that accepts a few
menu item keystrokes from a user, but may not be terminated by ctrl-C ? E.g.
how do I block ctrl-C in a QNX console app?

Jay Marchetti
Pittsburgh Firmware

Ignore signal. (probably SIGINT, but I am not sure.)

Pavol Kycina.

“Jay Marchetti” <marchetti@pittsburghfirmware.com> wrote in message
news:93cmch$s8j$1@inn.qnx.com

What is a good way to have a QNX4 app running in pterm that accepts a few
menu item keystrokes from a user, but may not be terminated by ctrl-C ?
E.g.
how do I block ctrl-C in a QNX console app?

Jay Marchetti
Pittsburgh Firmware

Try either from within the process:

/* Disable CTRL-S and CTRL-C actions on this Process */
if ( -1 == dev_mode( GL_FD_STDIN, NULL, _DEV_ISIG | _DEV_OSFLOW ) )
{
dsfpie_tblk( DS_PARAM, HTE_LEV_WARNING, “Debug Control”
“\nUnable to disable Console Modes _DEV_ISIG _DEV_OSFLOW\n%s”,
strerror(errno) );
}

or in a wrapper script for an existing process:

Start the process - Break_CTRL-C Disabled on this console, re-enabled after exit.

stty intr=00
process
stty intr=03

-Paul

Jay Marchetti <marchetti@pittsburghfirmware.com> wrote in message news:93cmch$s8j$1@inn.qnx.com

What is a good way to have a QNX4 app running in pterm that accepts a few
menu item keystrokes from a user, but may not be terminated by ctrl-C ? E.g.
how do I block ctrl-C in a QNX console app?

Jay Marchetti
Pittsburgh Firmware
\

dev_mode does the trick. Thanks Paul…
Jay

Paul Russell <paul@jenosys.com> wrote in message
news:93cttn$3cm$1@inn.qnx.com

Try either from within the process:

/* Disable CTRL-S and CTRL-C actions on this Process */
if ( -1 == dev_mode( GL_FD_STDIN, NULL, _DEV_ISIG | _DEV_OSFLOW ) )
{
dsfpie_tblk( DS_PARAM, HTE_LEV_WARNING, “Debug Control”
“\nUnable to disable Console Modes _DEV_ISIG _DEV_OSFLOW\n%s”,
strerror(errno) );
}

or in a wrapper script for an existing process:

Start the process - Break_CTRL-C Disabled on this console, re-enabled

after exit.
stty intr=00
process
stty intr=03

-Paul

Jay Marchetti <> marchetti@pittsburghfirmware.com> > wrote in message
news:93cmch$s8j$> 1@inn.qnx.com> …
What is a good way to have a QNX4 app running in pterm that accepts a
few
menu item keystrokes from a user, but may not be terminated by ctrl-C ?
E.g.
how do I block ctrl-C in a QNX console app?

Jay Marchetti
Pittsburgh Firmware


\