Check fork() return value
This commit is contained in:
parent
151a18cd10
commit
1a29dc59c5
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2007-2009 Dag-Erling Coïdan Smørgrav
|
||||
* Copyright (c) 2007-2009 Dag-Erling Coïdan Smørgrav
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -161,7 +161,10 @@ test_flopen_lock_child(void)
|
||||
if (fd1 < 0) {
|
||||
result = strerror(errno);
|
||||
} else {
|
||||
if ((pid = fork()) == 0) {
|
||||
pid = fork();
|
||||
if (pid == -1) {
|
||||
result = strerror(errno);
|
||||
} else if (pid == 0) {
|
||||
select(0, 0, 0, 0, 0);
|
||||
_exit(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user