-#if 0
- sys_fcntl(0, F_SETFD, 0);
- sys_fcntl(1, F_SETFD, 0);
- sys_fcntl(2, F_SETFD, 0);
-#else
- spin_lock(¤t->files->file_lock);
- FD_CLR(0, current->files->close_on_exec);
- FD_CLR(1, current->files->close_on_exec);
- FD_CLR(2, current->files->close_on_exec);
- spin_unlock(¤t->files->file_lock);
-#endif
+ spin_lock(&files->file_lock);
+ fdt = files_fdtable(files);
+ FD_CLR(0, fdt->close_on_exec);
+ FD_CLR(1, fdt->close_on_exec);
+ FD_CLR(2, fdt->close_on_exec);
+ spin_unlock(&files->file_lock);