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:
@@ -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 ;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user