qa: fix CID 168327 and CID 168326
This commit is contained in:
parent
ec8d3427b7
commit
bd8ced55f1
@ -38,7 +38,10 @@ main() {
|
|||||||
else /* parent */
|
else /* parent */
|
||||||
{
|
{
|
||||||
close(p[1]);
|
close(p[1]);
|
||||||
read(p[0], &dummy, 1);
|
if(read(p[0], &dummy, 1) > 0){
|
||||||
|
printf("sync read received data");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(p[0]);
|
close(p[0]);
|
||||||
printf("\nPARENT: sending SIGHUP\n\n");
|
printf("\nPARENT: sending SIGHUP\n\n");
|
||||||
kill(pid,SIGHUP);
|
kill(pid,SIGHUP);
|
||||||
|
@ -33,7 +33,10 @@ main() {
|
|||||||
else /* parent */
|
else /* parent */
|
||||||
{
|
{
|
||||||
close(p[1]);
|
close(p[1]);
|
||||||
read(p[0], &dummy, 1);
|
if(read(p[0], &dummy, 1) > 0){
|
||||||
|
printf("sync read received data");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(p[0]);
|
close(p[0]);
|
||||||
printf("\nPARENT: sending SIGQUIT\n\n");
|
printf("\nPARENT: sending SIGQUIT\n\n");
|
||||||
kill(pid,SIGQUIT);
|
kill(pid,SIGQUIT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user