search for: _sc_open_max

Displaying 20 results from an estimated 22 matches for "_sc_open_max".

2014 Jul 25
3
[PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...@ extern GUESTFS_DLL_PUBLIC int guestfs___add_libvirt_dom (guestfs_h *g, virDomain # define program_name "libguestfs" #endif +/* Close all file descriptors matching the condition. */ +#define close_file_descriptors(cond) do { \ + int max_fd = sysconf (_SC_OPEN_MAX); \ + int fd; \ + if (max_fd == -1) \ + max_fd = 1024; \ + if (max_fd > 65536)...
2023 Jul 11
1
[libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
...child (struct command *cmd, char **env) for (i = 1; i < NSIG; ++i) sigaction (i, &sa, NULL); - if (cmd->close_files) { - /* Close all other file descriptors. This ensures that we don't - * hold open (eg) pipes from the parent process. - */ - max_fd = sysconf (_SC_OPEN_MAX); - if (max_fd == -1) - max_fd = 1024; - if (max_fd > 65536) - max_fd = 65536; /* bound the amount of work we do here */ - for (fd = 3; fd < max_fd; ++fd) - close (fd); - } + /* Close all other file descriptors. This ensures that we don't + * hold open...
2014 Jul 30
2
[PATCH v2] launch: Close file descriptors after fork (RHBZ#1123007).
https://bugzilla.redhat.com/show_bug.cgi?id=1123007 This is version 2 of the patch which avoids incorrectly closing stderr, so we can still see debug and error messages. Rich.
2014 Jul 28
1
Re: [PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...@@ extern GUESTFS_DLL_PUBLIC int guestfs___add_libvirt_dom (guestfs_h *g, virDomain # define program_name "libguestfs" #endif +/* Close all file descriptors matching the condition. */ +#define close_file_descriptors(cond) do { \ + int max_fd = sysconf (_SC_OPEN_MAX); \ + int fd; \ + if (max_fd == -1) \ + max_fd = 1024; \ + if (max_fd > 65536)...
2003 Jan 06
0
smbd using alot of cpu
...9 stat64 0.09 170 93 statvfs64 0.00 7 acl 0.00 8 8 ----- ----- ----- ----- Total 1.42 15750 121 sysconf(_SC_OPEN_MAX) ................................................................................................................................ = 10010 stat64("/dev/telnet", 0x7f7f3220) .......................................................................................................................
2023 Jun 20
8
[Bug 3581] New: ssh-keyscan fails with `fdlim_get: bad value` with large file descriptor limit due to type confusion
...Status: NEW Severity: enhancement Priority: P5 Component: ssh-keyscan Assignee: unassigned-bugs at mindrot.org Reporter: janerik at fnordig.de ssh-keyscan fails with an obscure `fdlim_get: bad value` error when the values returned from `sysconf(_SC_OPEN_MAX)` does not fit into the 32 bits of an `int`. This happens on my M1 MacBook (with the system-provided `ssh-keyscan`) where I somehow have an `unlimited` file descriptor limit (which really is `INT64_MAX` or `9223372036854775807`, note that this seems non-standard). Changing the limit to something...
2001 Oct 22
2
[Bug 3] sshd fails to close open file descriptors when forking
http://bugzilla.mindrot.org/show_bug.cgi?id=3 markus at openbsd.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From markus at openbsd.org 2001-10-23
2006 Aug 14
4
too many close calls for non-opened fds
.................... = 0 (0) getuid() ................................................. = 0 (0) setgroups(0, NULL) ....................................... = 0 open("/dev/null", O_RDWR|0x800, 0123) .................... = 3 close(3) ................................................. = 0 sysconf(_SC_OPEN_MAX) .................................... = 2048 close(3) ................................................. ERR#9 EBADF close(4) ................................................. ERR#9 EBADF close(5) ................................................. ERR#9 EBADF close(6) ...................................
2002 Aug 22
1
Applying the "Connection reset by peer"
Hi all, we're suffering heavily from the "connection reset by peer" problem when running Rsync on WinNT. Great was our relief when seeing Randy's message in http://www.mail-archive.com/rsync@lists.samba.org/msg01918.html I immediately installed the full Cygwin to recompile Rsync, but since I'm far from a C guru, I'm a bit puzzled with the last 2 lines in Randy's
2012 Mar 09
1
[PATCH 1/2] Close all file descriptors in the recovery process.
...r = fork (); if (r == 0) { + int fd, max_fd; pid_t qemu_pid = g->pid; pid_t parent_pid = getppid (); + /* Close all other file descriptors. This ensures that we don't + * hold open (eg) pipes from the parent process. + */ + max_fd = sysconf (_SC_OPEN_MAX); + if (max_fd == -1) + max_fd = 1024; + if (max_fd > 65536) + max_fd = 65536; /* bound the amount of work we do here */ + for (fd = 0; fd < max_fd; ++fd) + close (fd); + /* It would be nice to be able to put this in the same process * group...
2001 Oct 20
4
rsync on cygwin: Connection reset by peer
I have been trying to get rsync running correctly on cygwin for the past couple of days. I found a post on the cygwin list that said there was a bug in cygwin when using socketpair() but when I compiled the sample code: (http://jrepp.com/rsync/socketpair.c) both ways it works fine. Here's the article for reference: http://sources.redhat.com/ml/cygwin/2001-08/msg00357.html I am running the
2011 Nov 25
5
[Bug 1213] ssh-keyscan exits in mid-way
https://bugzilla.mindrot.org/show_bug.cgi?id=1213 --- Comment #37 from Daniel Richard G. <skunk at iSKUNK.ORG> 2011-11-25 12:40:45 EST --- Yet another failure mode... [...] # XXX.YYY.ZZ.8 SSH-2.0-Sun_SSH_1.1.3 # XXX.YYY.ZZ.9 SSH-2.0-OpenSSH_3.8.1p1 # XXX.YYY.ZZ.14 SSH-2.0-OpenSSH_4.3 # 10.10.1.35 SSH-2.0-RomSShell_4.62 Received disconnect from 10.10.1.35: 2: Protocol Timeout make: ***
2012 Jun 11
9
[Bug 793] New: ulogd -d does not close all fds
...h flock being used to execute chef, ulogd holds open the flock file /var/lock/chef-client. The fix would be to ulogd.c, line 1222ff, something like: // close any open file descriptors for (i=getdtablesize();i>=0;--i) close(i); or, if POSIX compliance is desired, use sysconf(_SC_OPEN_MAX). -- Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are watching all bug changes.
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here: https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html This now works, to some extent. The main problem now is that devices are named /dev/ubd[a-] which of course confuses everything. I'm thinking it may be easier to add a udev rule to rename them. Rich.
2013 Aug 09
5
[PATCH 0/4] Not quite working User-Mode Linux backend.
This is a User-Mode Linux backend for libguestfs. You can select it by doing: export LIBGUESTFS_BACKEND=uml export LIBGUESTFS_QEMU=/path/to/vmlinux Note we're reusing the 'qemu' variable in the handle for convenience. QEmu is not involved when using the UML backend. This almost works. UML itself crashes when the daemon tries to connect to the serial port. I suspect it's
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds some internal APIs for running commands. The first patch contains the new APIs. The subsequent patches change various parts of the library over to use it. Rich.
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed
2013 Apr 19
8
[PATCH 0 of 8] blktap3/libvhd: Introduce VHD library.
This patch series introduces the VHD library. It is based on the blktap2 one, with changes coming from the blktap2.5 one. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -