aboutsummaryrefslogtreecommitdiffstats
path: root/src/system-posix.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add an SPDX tag to all core files.Werner Koch2017-11-151-16/+17
| | | | --
* Fix last commit.Werner Koch2017-11-151-2/+2
| | | | | | | | | * src/system-posix.c (__assuan_usleep): Its ysec and usecs -- Copy+Paste without even compiling was pretty dumb. Signed-off-by: Werner Koch <[email protected]>
* Fix the nanosleep case of __assuan_usleep.Werner Koch2017-11-151-3/+2
| | | | | | | | | | | * src/system-posix.c (__assuan_usleep): Handle full seconds. -- This function would have failed for any value >= 1000000 because the nsec field is limited to 999999999 and the function fails for larger values. Signed-off-by: Werner Koch <[email protected]>
* Speedup closing fds before an exec.Werner Koch2016-07-131-0/+40
| | | | | | | | | | | * src/system-posix.c [__linux__]: Include dirent.h. (get_max_fds) [__linux__]: Return the actual used highest fd. -- This is the same code as introduced with the GnuPG commit 512c56af43027149e8beacf259746b8d7bf9b1a2 Signed-off-by: Werner Koch <[email protected]>
* Improve getting of max. number of open fds.Werner Koch2016-01-151-9/+64
| | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): Add getrlimit. * src/assuan-pipe-connect.c (MAX_OPEN_FDS): Remove non-used macro. * src/system.c (MAX_OPEN_FDS): Remove non-used macro. * src/system-posix.c: Include stdint.h, sys/time.h, sys/resource.h. (MAX_OPEN_FDS): Remove non-used macro. (get_max_fds): New. Taken from gnupg/common/exechelp-posix.c. (__assuan_spawn): Use it here. -- This is related to GnuPG-bug-id: 2071 Changing of get_max_fds from LPGLv3+ to LGPLv2+ approved by me as sole author or that code. Signed-off-by: Werner Koch <[email protected]>
* Make new functions also visible on non-W32.Werner Koch2012-01-251-21/+21
| | | | | | | * src/system-posix.c (__assuan_read, __assuan_write, __assuan_recvmsg) (__assuan_sendmsg, __assuan_waitpid): Make functions global. * src/libassuan.vers: Add above functions. * configure.ac: Set version to 2.1.0-git.
* Extend system hooks table by socket and connect functions.Marcus Brinkmann2011-02-021-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 2011-02-02 Marcus Brinkmann <[email protected]> * assuan-defs.h (_assuan_socket, _assuan_connect): New prototypes. * assuan.h.in (ASSUAN_SYSTEM_HOOKS_VERSION): Bumped to 2. (struct assuan_system_hooks): Add socket and connect members. (__assuan_socket, __assuan_connect): New prototypes. (_ASSUAN_SYSTEM_PTH_IMPL): Add socket and connect members. * assuan-socket-connect.c (assuan_socket_connect): Call _assuan_socket and _assuan_connect instead _assuan_sock_new and _assuan_sock_connect. (libassuan.def, libassuan.vers): Add __assuan_socket and __assuan_connect. * system.c (_assuan_system_hooks_copy): Initialize destination from system hooks, so we don't get any NULL pointers if there is a version mismatch. Support version 2 of the system hook structure. (_assuan_socket, _assuan_connect): New functions. * system-posix.c (__assuan_socket, __assuan_connect): New functions. (_assuan_system_hooks): Add __assuan_socketm, __assuan_connect. * system-w32.c (__assuan_socket, __assuan_connect): New functions. (_assuan_system_hooks): Add __assuan_socketm, __assuan_connect. * system-w32ce.c (__assuan_socket, __assuan_connect): New functions. (_assuan_system_hooks): Add __assuan_socketm, __assuan_connect.
* Refactored platform system code.Werner Koch2010-03-161-0/+339