search for: pipefd

Displaying 20 results from an estimated 31 matches for "pipefd".

2013 Nov 08
2
[PATCH 3/3] arm64: Introduce arm64 support
.../usr/klibc/arch/arm64/pipe.c > new file mode 100644 > index 0000000..f10a69e > --- /dev/null > +++ b/usr/klibc/arch/arm64/pipe.c > @@ -0,0 +1,10 @@ > +#include <unistd.h> > + > +#ifndef __NR_pipe > + > +int pipe(int pipefd[2]) > +{ > + return pipe2(pipefd, 0); > +} > + > +#endif /* __NR_pipe */ This is a generic routine, right? It should be part of the generic ersatz functions, no? -hpa
2007 Apr 18
1
[PATCH] Lguest launcher, child starving parent
...============================================== --- linux-2.6-lguest.orig/Documentation/lguest/lguest.c 2007-04-05 16:13:08.000000000 -0400 +++ linux-2.6-lguest/Documentation/lguest/lguest.c 2007-04-05 16:16:31.000000000 -0400 @@ -328,15 +328,15 @@ static void wake_parent(int pipefd, stru for (;;) { fd_set rfds = devices->infds; + int ignorefd; select(devices->max_infd+1, &rfds, NULL, NULL, NULL); - if (FD_ISSET(pipefd, &rfds)) { - int ignorefd; - if (read(pipefd, &ignorefd, sizeof(ignorefd)) == 0) - exit(0); - FD_CLR(ignorefd, &dev...
2007 Apr 18
1
[PATCH] Lguest launcher, child starving parent
...============================================== --- linux-2.6-lguest.orig/Documentation/lguest/lguest.c 2007-04-05 16:13:08.000000000 -0400 +++ linux-2.6-lguest/Documentation/lguest/lguest.c 2007-04-05 16:16:31.000000000 -0400 @@ -328,15 +328,15 @@ static void wake_parent(int pipefd, stru for (;;) { fd_set rfds = devices->infds; + int ignorefd; select(devices->max_infd+1, &rfds, NULL, NULL, NULL); - if (FD_ISSET(pipefd, &rfds)) { - int ignorefd; - if (read(pipefd, &ignorefd, sizeof(ignorefd)) == 0) - exit(0); - FD_CLR(ignorefd, &dev...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...terface %s up", devname); + + if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) + err(1, "getting hw address for %s", devname); + + memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6); +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct devices *devices) +{ + int parent = getppid(); + nice(19); + + set_fd(pipefd, devices); + + for (;;) { + fd_set rfds = devices->infds; + + select(devices->max_infd+1, &rfds, NULL, NULL, NULL); + if (FD_ISSET(pipefd, &rfds)) { + int ignorefd; + if (read(pipefd, &igno...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...terface %s up", devname); + + if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) + err(1, "getting hw address for %s", devname); + + memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6); +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct devices *devices) +{ + int parent = getppid(); + nice(19); + + set_fd(pipefd, devices); + + for (;;) { + fd_set rfds = devices->infds; + + select(devices->max_infd+1, &rfds, NULL, NULL, NULL); + if (FD_ISSET(pipefd, &rfds)) { + int ignorefd; + if (read(pipefd, &igno...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...;); + return fd; +} + +static void set_fd(int fd, struct device_list *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct device_list *devices) +{ + nice(19); + + set_fd(pipefd, devices); + + for (;;) { + fd_set rfds = devices->infds; + + select(devices->max_infd+1, &rfds, NULL, NULL, NULL); + if (FD_ISSET(pipefd, &rfds)) { + int ignorefd; + if (read(pipefd, &ignorefd, sizeof(ignorefd)...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...;); + return fd; +} + +static void set_fd(int fd, struct device_list *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct device_list *devices) +{ + nice(19); + + set_fd(pipefd, devices); + + for (;;) { + fd_set rfds = devices->infds; + + select(devices->max_infd+1, &rfds, NULL, NULL, NULL); + if (FD_ISSET(pipefd, &rfds)) { + int ignorefd; + if (read(pipefd, &ignorefd, sizeof(ignorefd)...
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
The previous code: fcntl (fd, F_SETFL, O_NONBLOCK) was technically incorrect, because it would have reset any other flags on the file descriptor. Thanks: Eric Blake --- bootstrap | 1 + daemon/inotify.c | 6 ++++-- lib/conn-socket.c | 21 +++++++++++---------- m4/.gitignore | 9 +++++++++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git
2013 Nov 11
0
[PATCH 3/3] arm64: Introduce arm64 support
...gt; > new file mode 100644 > > index 0000000..f10a69e > > --- /dev/null > > +++ b/usr/klibc/arch/arm64/pipe.c > > @@ -0,0 +1,10 @@ > > +#include <unistd.h> > > + > > +#ifndef __NR_pipe > > + > > +int pipe(int pipefd[2]) > > +{ > > + return pipe2(pipefd, 0); > > +} > > + > > +#endif /* __NR_pipe */ > > This is a generic routine, right? It should be part of the generic > ersatz functions, no? Thanks, I've moved pipe to the generic set. Cheers, -- Steve
2013 Mar 05
1
[PATCH v2] fuse: Add guestunmount program to handle unmounting (RHBZ#916780)
Since the first patch: - The program is now called 'guestunmount'. - I tested the --fd option and it appears to work. - You can now control retries / quiet. - Revised man pages. - Includes tests. I'm just running through the automated tests now. Rich.
2015 Nov 23
1
[PATCH] fuse: fix return value of guestunmount for unmounted paths
...his should cause guestunmount - * to exit. It should exit with status code _2_ because we gave it - * a mountpoint which isn't a FUSE mountpoint. + * to exit. It should exit with status code _3_ because we gave it + * a directory which isn't a FUSE mountpoint. */ close (pipefd[1]); @@ -117,10 +117,10 @@ main (int argc, char *argv[]) perror ("waitpid"); exit (EXIT_FAILURE); } - if (!WIFEXITED (status) || WEXITSTATUS (status) != 2) { + if (!WIFEXITED (status) || WEXITSTATUS (status) != 3) { char status_string[80]; - fprintf (stderr, &qu...
2013 Nov 08
0
[PATCH 3/3] arm64: Introduce arm64 support
.../usr/klibc/arch/arm64/pipe.c b/usr/klibc/arch/arm64/pipe.c new file mode 100644 index 0000000..f10a69e --- /dev/null +++ b/usr/klibc/arch/arm64/pipe.c @@ -0,0 +1,10 @@ +#include <unistd.h> + +#ifndef __NR_pipe + +int pipe(int pipefd[2]) +{ + return pipe2(pipefd, 0); +} + +#endif /* __NR_pipe */ diff --git a/usr/klibc/arch/arm64/setjmp.S b/usr/klibc/arch/arm64/setjmp.S new file mode 100644 index 0000000..3d5c1c6 --- /dev/null +++ b/usr/klibc/arch/arm64/...
2019 Aug 02
0
[nbdkit PATCH v2 07/17] build: Audit for use of pipe2
...reads from streaming.fifo - * and checks that the content is correct. + /* Fork to run a second process which reads from streaming.fifo and + * checks that the content is correct. The test doesn't care about + * fd leaks, so we don't bother with CLOEXEC. */ if (pipe (pipefd) == -1) { perror ("pipe"); -- 2.20.1
2016 May 19
0
[PATCH 2/3] tests: remove remaining relative paths to binaries
...--git a/fuse/test-guestunmount-fd.c b/fuse/test-guestunmount-fd.c index ad7ff74..019f821 100644 --- a/fuse/test-guestunmount-fd.c +++ b/fuse/test-guestunmount-fd.c @@ -70,7 +70,7 @@ main (int argc, char *argv[]) snprintf (fd_str, sizeof fd_str, "%d", pipefd[0]); - execlp ("./guestunmount", "guestunmount", "--fd", fd_str, "/", NULL); + execlp ("guestunmount", "guestunmount", "--fd", fd_str, "/", NULL); perror ("execlp"); _exit (EXIT_F...
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...n */ diff --git a/usr/klibc/pipe.c b/usr/klibc/pipe.c new file mode 100644 index 0000000..dfaed9e --- /dev/null +++ b/usr/klibc/pipe.c @@ -0,0 +1,11 @@ +#include <unistd.h> +#include <sys/syscall.h> + +#ifndef __NR_pipe + +int pipe(int pipefd[2]) +{ + return pipe2(pipefd, 0); +} + +#endif /* __NR_pipe */ diff --git a/usr/klibc/poll.c b/usr/klibc/poll.c new file mode 100644 index 0000000..69da693 --- /dev/null +++ b/usr/klibc/poll.c @@ -0,0 +1,21 @@ +#include <errno.h> +#include...
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello, This series introduces arm64 support to klibc. I've rebased the work from Neil Williams and Anil Singhar into the following three patches. Most of the code changes are due to new syscall implementations being needed for arm64 as a only a minimal set of syscalls are defined in the arm64 kernel. This series is to be applied against the latest klibc, just after 25a66fa README.klibc:
2009 Feb 19
1
NUT 2.4.1 crashes on FreeBSD - additional info
Hi Volker, I forward your request to the user list since I don't currently have much time to process it. quickly testing 2.4.1, I wasn't able to reproduce it. a question: was it working with the exact same context/config with 2.2.2? cheers, Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -
2013 Mar 04
1
[PATCH] fuse: Add guestmount-cleanup program to handle unmounting (RHBZ#916780).
* PATCH FOR DISCUSSION ONLY - NOT TO BE APPLIED * Colin suggested something which seems eminently sensible: https://bugzilla.redhat.com/show_bug.cgi?id=916780 I've been through a couple of rounds of trying to implement this. I started with adding the option as suggested to the guestmount program, but it tended to make the guestmount program more complex. More importantly, adding
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...long)map_elf64; + else + return (unsigned long)load_bzimage; + break; + default: + /* unrecognized class */ + errno = EINVAL; + return 0; + } + +} + int main(int argc, char *argv[]) { unsigned long mem, pgdir, entry, initrd_size, page_offset; int arg, kern_fd, fd, child, pipefd[2]; - Elf32_Ehdr hdr; + /* Worst case */ + Elf64_Ehdr hdr; struct sigaction act; sigset_t sigset; struct lguest_device_desc *devdescs; struct devices devices; struct lguest_boot_info *boot = (void *)0; const char *initrd_name = NULL; - u32 (*load)(int, const Elf32_Ehdr *ehdr, un...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...long)map_elf64; + else + return (unsigned long)load_bzimage; + break; + default: + /* unrecognized class */ + errno = EINVAL; + return 0; + } + +} + int main(int argc, char *argv[]) { unsigned long mem, pgdir, entry, initrd_size, page_offset; int arg, kern_fd, fd, child, pipefd[2]; - Elf32_Ehdr hdr; + /* Worst case */ + Elf64_Ehdr hdr; struct sigaction act; sigset_t sigset; struct lguest_device_desc *devdescs; struct devices devices; struct lguest_boot_info *boot = (void *)0; const char *initrd_name = NULL; - u32 (*load)(int, const Elf32_Ehdr *ehdr, un...