0802編寫一個程序,使用raise函數向進程自身發送一個SIGABRT信號,使用進程非正常結束

/*ide

  • 編寫一個程序,使用raise函數向進程自身發送一個SIGABRT信號,使用進程非正常結束
    */
    #include <stdio.h>
    #include <signal.h>
    #include <sys/types.h>

int main(int argc, char *argv[])
{
printf("This is a test!\n");
if(raise(SIGABRT)==-1)
{
printf("Send Failed!\n");
exit(1);
}
printf("This is a test,again!\ns");
return 0;
}函數

相關文章
相關標籤/搜索