the test case for ticket #995

wait() should return with an error when the process has no children


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19983 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2007-01-27 16:00:19 +00:00
parent a7bbb81537
commit 5839b2df71
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -33,6 +33,8 @@ SimpleTest lock_node_test :
: be
;
SimpleTest wait_test : wait_test.c ;
SubInclude HAIKU_TOP src tests system kernel cache ;
#SubInclude HAIKU_TOP src tests system kernel disk_device_manager ;
SubInclude HAIKU_TOP src tests system kernel device_manager ;
+19
View File
@@ -0,0 +1,19 @@
/*
* Copyright 2007, Jérôme Duval. All rights reserved.
* Distributed under the terms of the MIT License.
*
*/
#include <sys/wait.h>
#include <stdio.h>
/**
* wait() doesn't return on Haiku, whereas it should return an error when the
* process has no children.
*/
int main() {
int child_status;
pid_t pid = wait(&child_status);
printf("wait returned %ld\n", pid);
}