mirror of
https://github.com/troglobit/libite.git
synced 2026-10-30 12:40:38 +00:00
Rename tests/ -> test/ and update internal refs.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
692dbadd3a
commit
c9633ffbb0
39 files changed
+3
-3
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "check.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int chan[2];
|
||||
int status;
|
||||
|
||||
pipe(chan);
|
||||
|
||||
if (fork() > 0) {
|
||||
dup2(chan[0], STDIN_FILENO);
|
||||
if (yorn("Do you really wanna do this (y/N)? ")) {
|
||||
printf("Affirmative!\n");
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
printf("OK, aborting!\n");
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
if (write(chan[1], "Y", 1) != 1)
|
||||
return 1;
|
||||
|
||||
wait(&status);
|
||||
|
||||
return WEXITSTATUS(status);
|
||||
}
|
||||
Reference in new issue
Block a user