[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[find] dir fd not closed before/during exec
From: |
Érsek László |
Subject: |
[find] dir fd not closed before/during exec |
Date: |
Mon, 18 Aug 2003 04:07:24 +0200 (CEST) |
Hi,
I think starting_desc should be closed between the fork() and execvp()
calls in the child in find/pred.c/launch(). (Or FD_CLOEXEC should be set
on starting_desc somewhere before execvp(), maybe in find/find.c/main()?)
address@hidden:/tmp/lacos/findutils-4.1.20/find$ ./find -name . -exec sleep 100
\; &
[1] 13757
address@hidden:/tmp/lacos/findutils-4.1.20/find$ ls -l /proc/$(pidof sleep)/fd
total 0
lrwx------ 1 lacos users 64 Aug 18 03:10 0 -> /dev/ttyp1
lrwx------ 1 lacos users 64 Aug 18 03:10 1 -> /dev/ttyp1
lrwx------ 1 lacos users 64 Aug 18 03:10 2 -> /dev/ttyp1
lr-x------ 1 lacos users 64 Aug 18 03:10 3 ->
/tmp/lacos/findutils-4.1.20/find/
Thank you
Laszlo Ersek
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [find] dir fd not closed before/during exec,
Érsek László <=