6 * Non-blocking variant of close(2). This call is to be used by system
7 * services that need to close arbitrary local file descriptors. The purpose
8 * of the call is to avoid that such services end up blocking on closing socket
9 * file descriptors with the SO_LINGER socket option enabled. They cannot put
10 * the file pointer in non-blocking mode to that end, because the file pointer
11 * may be shared with other processes.
13 * Even though this call is defined for system services only, there is no harm
14 * in letting arbitrary user processes use this functionality. Thus, it needs
15 * no separate VFS call number.
22 memset(&m
, 0, sizeof(m
));
23 m
.m_lc_vfs_close
.fd
= fd
;
24 m
.m_lc_vfs_close
.nblock
= 1;
26 return _taskcall(VFS_PROC_NR
, VFS_CLOSE
, &m
);