libposix: deep refactor; add sys/posixly command

With these changes, libposix (and newlib) can run MirBSD Korn Shell.
This commit is contained in:
2017-09-11 01:01:11 +02:00
parent 2f99fb162f
commit 001069aa7b
56 changed files with 4939 additions and 608 deletions

View File

@ -26,6 +26,7 @@ main() {
if (pid == 0) {
printf("\nI am the new child!\n\n");
write(p[1], "", 1);
close(p[1]);
close(p[0]);
for(;;){
@ -36,11 +37,11 @@ main() {
}
else /* parent */
{
close(p[1]);
if(read(p[0], &dummy, 1) > 0){
printf("sync read received data");
if(read(p[0], &dummy, 1) != 1){
printf("sync read");
exit(EXIT_FAILURE);
}
close(p[1]);
close(p[0]);
printf("\nPARENT: sending SIGINT\n\n");
kill(pid,SIGINT);