[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Small test example for: cannot create /dev/null: Interrupted system call



Hi,

found out when running the testsuite for elfutils that the following
code reproducibly triggers the interrupted system call bug:

#! /bin/sh                                                                      
echo 'main () { while (1) pause (); }' > native.c
gcc -o native -g native.c > /dev/null 2>&1 &&
{ ./native 2>&1 & native=$! ; } || native=0
kill -9 $native || :
wait $native 2 > /dev/null || :


#> sh ./test.sh
./test.sh: 6: ./test.sh: cannot create /dev/null: Interrupted system
call

HTH!


Reply to: