1 /* Test 14. unlinking an open file. */
15 char name
[20] = {"TMP14."};
29 sprintf(&name
[6], "%x", pid
);
31 for (i
= 0; i
< TRIALS
; i
++) {
32 if ( (fd0
= creat(name
, 0777)) < 0) e(1);
33 if (write(fd0
, name
, 20) != 20) e(2);
34 if (unlink(name
) != 0) e(3);
35 if (close(fd0
) != 0) e(4);
38 fd0
= creat(name
, 0777);
42 return(-1); /* impossible */