Renaming all folders

This commit is contained in:
Fabio Scotto di Santolo
2025-08-22 16:21:42 +02:00
parent 331308b2d8
commit 538cb4559e
45 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,40 @@
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2025 Fabio Scotto di Santolo
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main(void)
{
if (!fork())
return 1;
int status;
pid_t pid = wait(&status);
if (pid == -1) {
perror("wait");
}
printf("pid=%d\n", pid);
if (WIFEXITED(status))
printf("Normal termination with exit status=%d\n",
WEXITSTATUS(status));
if (WIFSIGNALED(status))
printf("Killed by signal=%d%s\n", WTERMSIG(status),
WCOREDUMP(status) ? " (dumped core)" : "");
if (WIFSTOPPED(status))
printf("Stopped by signal=%d\n", WSTOPSIG(status));
if (WIFCONTINUED(status))
printf("Continued\n");
return 0;
}