Well. Provide a piece of code as a workaround. compile the following C code:
========================
#include "signal.h"
int main( int argc, char ** argv )
{
sigset_t oldset, newset;
sigfillset( &newset ); sigprocmask( SIG_UNBLOCK, &newset, &oldset );
int pid = fork();
if ( pid == 0 )
{ execvp( argv[1], &(argv[1]) ); perror("\n");
}
else
{ printf("father return;\n");
}
}
=========================
gcc -o sigwapper thisfile.c
=========================
Use the program to fix the problem as workaround. need root privilege :
=========================
$ ./sigwapper /etc/init.d/ssh restart
=========================
Check if the C + c is back or not.
Well. Provide a piece of code as a workaround. compile the following C code: ======= ======= ===
=======
#include "signal.h"
int main( int argc, char ** argv )
{
sigset_t oldset, newset;
sigprocmask( SIG_UNBLOCK, &newset, &oldset );
execvp( argv[1], &(argv[1]) );
perror( "\n");
printf( "father return;\n"); ======= ======= ==== ======= ======= ==== ======= ======= ==== ======= ======= ====
sigfillset( &newset );
int pid = fork();
if ( pid == 0 )
{
}
else
{
}
}
=======
gcc -o sigwapper thisfile.c
=======
Use the program to fix the problem as workaround. need root privilege :
=======
$ ./sigwapper /etc/init.d/ssh restart
=======
Check if the C + c is back or not.