当前位置: 技术问答>linux和unix
求助:向各位大哥请教个进程问题,谢谢!
来源: 互联网 发布时间:2015-12-03
本文导语: #include #include #include void terminatehandler(int signumber) int main(void) { char buffer1[100],buffer2[100]; int i; if((signal(SIGTERM,&terminatehandler))==SIG_ER) { printf("couldn't register signal handler n"); } printf("pid of this process:%6d",...
#include
#include
#include
void terminatehandler(int signumber)
int main(void)
{
char buffer1[100],buffer2[100];
int i;
if((signal(SIGTERM,&terminatehandler))==SIG_ER)
{
printf("couldn't register signal handler n");
}
printf("pid of this process:%6d",getpid());
for( ; ; )
{
fgets(buffer1, sizeof(buffer1), stdin);
for(i=0; i=97&&buffer1[ i ]
#include
#include
void terminatehandler(int signumber)
int main(void)
{
char buffer1[100],buffer2[100];
int i;
if((signal(SIGTERM,&terminatehandler))==SIG_ER)
{
printf("couldn't register signal handler n");
}
printf("pid of this process:%6d",getpid());
for( ; ; )
{
fgets(buffer1, sizeof(buffer1), stdin);
for(i=0; i=97&&buffer1[ i ]