Zum Hauptinhalt springen
YouTube Security VideosGolemDE: Wie gut ist Deutschlands neuer Kampfjet wirklich?(03.10.2026 um 09:30 Uhr)
•••••••••
Sichere ProgrammierungHacktoberfest Weekend Challenge: Build for a Friend — SpeakMate AI(03.10.2026 um 09:25 Uhr)
•
YouTube Security VideosGolemDE: Wie gut ist Deutschlands neuer Kampfjet wirklich?(03.10.2026 um 09:30 Uhr)
•••••••••
Sichere ProgrammierungHacktoberfest Weekend Challenge: Build for a Friend — SpeakMate AI(03.10.2026 um 09:25 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

How to tell if a process is getting terminated by SIGQUIT.

I am new to Linux Systems Programming and as the title suggests, I am trying to identify if a particular process is getting terminated by SIGTERM, SIGQUIT or…

Beitrag
0
Seite
0
↗ Quelle (reddit.com)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

I am new to Linux Systems Programming and as the title suggests, I am trying to identify if a particular process is getting terminated by SIGTERM, SIGQUIT or SIGINT. I am trying to identify between them using the status of the process which is returning 2 and 15 for SIGINT and SIGTERM respectively as it is supposed to be, but instead it is returning 131 for SIGTERM where it should be 3.

Distro Used: Ubuntu

#include <iostream> #include <signal.h> #include <wait.h> using namespace std; int main() { int pid,status; pid=fork(); if (pid==0) while(1); if (pid!=0) { if(getchar()){ //kill(pid,SIGINT); //status 2 //kill(pid,SIGQUIT); //status should be 3 but coming out 131 why? //kill(pid,SIGTERM); //status 15 } wait(&status); if (WIFSIGNALED(status)) if (status==2) cout<<"Terminated by SIGINT"<<endl; else if (status==15) cout<<"Terminated by SIGTERM"<<endl; else if (status==131 /*|| status==3*/) cout<<"Terminated by SIGQUIT"<<endl; } return 0; } 
submitted by /u/RadioActiveX1
[link] [comments]
🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

ATT&CK-Navigator · IoC-Radar · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to tell if a process is getting terminated by SIGQUIT.

Thematisch verwandte Begriffe: tell, process, getting, terminated · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Nächster Beitrag