Properly set exit code for killed processed.

This commit is contained in:
Enrico Fraccaroli (Galfurian)
2023-08-22 16:32:43 -04:00
parent c82779f1af
commit 452aa40770
4 changed files with 40 additions and 23 deletions
+1 -2
View File
@@ -40,8 +40,7 @@ int main(int argc, char *argv[])
}
// Print the message.
printf("Data read from memory: %s (%p)\n", str, str);
strcpy(str, "Hello!");
// printf("Data read from memory: %s (%p)\n", str, str);
str[0] = 'H';
// Detatch the shared memory.
if (shmdt(str) < 0) {
perror("shmdt");