mirror of
https://repo.or.cz/socat.git
synced 2025-07-07 13:26:33 +00:00
Internal: Reworked xioopts
This commit is contained in:
parent
1c1a91027a
commit
5eebca3a5b
37 changed files with 1380 additions and 1199 deletions
|
@ -25,18 +25,20 @@ const struct addrdesc xioaddr_system = { "SYSTEM", 3, xioopen_system, GROUP_FD|G
|
|||
|
||||
static int xioopen_system(int argc, const char *argv[], struct opt *opts,
|
||||
int xioflags, /* XIO_RDONLY etc. */
|
||||
xiofile_t *fd,
|
||||
xiofile_t *xfd,
|
||||
groups_t groups,
|
||||
int dummy1, int dummy2, int dummy3
|
||||
) {
|
||||
struct single *sfd = &xfd->stream;
|
||||
int status;
|
||||
char *path = NULL;
|
||||
int duptostderr;
|
||||
int result;
|
||||
const char *string = argv[1];
|
||||
|
||||
status = _xioopen_foxec(xioflags, &fd->stream, groups, &opts, &duptostderr);
|
||||
if (status < 0) return status;
|
||||
status = _xioopen_foxec(xioflags, sfd, groups, &opts, &duptostderr);
|
||||
if (status < 0)
|
||||
return status;
|
||||
if (status == 0) { /* child */
|
||||
int numleft;
|
||||
|
||||
|
@ -72,6 +74,7 @@ static int xioopen_system(int argc, const char *argv[], struct opt *opts,
|
|||
}
|
||||
|
||||
/* parent */
|
||||
_xio_openlate(sfd, opts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue