aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb
Commit message (Collapse)AuthorAgeFilesLines
* Axe iobufferLaurent Bercot2021-09-2517-518/+25
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't forget child_spawn eitherLaurent Bercot2021-09-025-22/+22
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Infinite recursion my ass cheeksLaurent Bercot2021-09-021-1/+1
| | | | | | Sometimes clang warnings have a point. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* fix selfpipe_tophalf typeLaurent Bercot2021-08-261-1/+1
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add ipc_bind_reuse_permsLaurent Bercot2021-08-222-2/+19
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add tain_infiniteLaurent Bercot2021-08-181-0/+5
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add sig_altignore()2.11.0.0Laurent Bercot2021-07-291-0/+15
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Huge incompatible changes.Laurent Bercot2021-07-28149-405/+270
| | | | | | | | | | | | - Obsolete skalibs/environ.h and skalibs/getpeereid.h removed. - rc4 and md5 removed. - All *_t types renamed to avoid treading on POSIX namespace. - subgetopt() renamed to lgetopt(). - signal functions reworked; skasigaction removed; sig_stack removed - Various functions removed: skaoffsetof(), selfpipe_untrap() - New posixplz function: munmap_void. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't use dirfd as an identifierLaurent Bercot2021-07-241-2/+2
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Hide cdb_find_state in the common caseLaurent Bercot2021-07-242-51/+60
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add cdb_init_at and cdb_init_fromfd, rename cdb_readerLaurent Bercot2021-07-245-25/+47
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* New 2.11.0.0 branch with several modificationsLaurent Bercot2021-07-2315-187/+165
| | | | | | | | - libbiguint removed - cdb_make changed to cdbmake (because different ui) - cdb redesigned Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Save errno when freeing a cdbLaurent Bercot2021-07-211-1/+8
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* bugfix: offset in cdb mmapLaurent Bercot2021-06-302-3/+3
| | | | | | | An offset of -1 worked because most OSes treat it as 0, but DS9k would fail on it. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* cdb always mmapsLaurent Bercot2021-06-293-38/+25
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Cosmetic fixesLaurent Bercot2021-05-143-10/+9
|
* bugfix: ipc_bind_reuse_lock must ignore umaskLaurent Bercot2021-02-131-1/+2
|
* Get rid of webipc.h and DJBUNIX_FLAG_*Laurent Bercot2020-12-0921-43/+56
| | | | | | | | | | | | | | Decent semantic header separation is hard. It's always an ongoing process. Here socket.h always included webipc.h for listen(), and webipc.h always included djbunix.h for socket_internal() and socketpair_internal(). That's ugh. Just move all the socket stuff into one socket header. Of course, djbunix.h is still needed most of the time for fd_close() and other operations on fds, but those are generic anyway. Also, O_CLOEXEC exists everywhere now, so we can use it as well as O_NONBLOCK instead of redefining the flags in djbunix.h.
* Some trivial bugfixes and cleanupsLaurent Bercot2020-12-075-2/+5
|
* Fix iobufferk_init on recent Linux; remove last superfluous coeLaurent Bercot2020-12-042-7/+4
|
* Revamp lock primitives; prepare for 2.10.0.0 instead of 2.9.4.0Laurent Bercot2020-11-2910-184/+67
| | | | | | | | | | | flock() doesn't have a way to test for a lock without taking it. lockf() doesn't have shared locks. The only way to have both is fcntl(). So I rewrote all the locking stuff around fcntl(), and used the opportunity to change the interface. The point of changing the interface is to stop having to bother with the old one, so to hell with compatibility, let's just do a major bump.
* child_spawn cleanup, configure cleanupLaurent Bercot2020-11-255-119/+119
|
* Complete revamp of the pathexec functionsLaurent Bercot2020-11-2428-509/+0
| | | | | | | | | | | | | | | | | - pathexec_run is now called exec_ae a for provided file name (default: argv[0]) e for provided envp (default: environ) - pathexec is now called mexec. m for merge environment. Option letters are: a for provided file name (default: argv[0]) e for provided envp (default: environ) f for provided envp *and* length of the envp m for provided modif string plus its length (the length is always needed because the modifs are null-terminated) n for provided modif string, length *and* number of modifs - functions have a foo0 version for _exit(0) when argv[0] is null - functions have a xfoo version to die if the exec fails - and a xfoo0 - Compatibility #defines and #includes are there until the next major bump
* Save syscalls on coe and ndelay_onLaurent Bercot2020-11-234-6/+4
|
* Add fd_shutdown()Laurent Bercot2020-11-201-0/+14
|
* Add ipc_bind_reuse_lock, rewrite ipc_bind_reuse to use itLaurent Bercot2020-11-082-7/+30
|
* Separate and expose ancil_recv_fd/ancil_send_fdLaurent Bercot2020-10-267-7/+7
| | | | | | | The goal is to make late channel creation easy, as opposed to textclient which always creates a new channel at start time. This commit also moves posixishard.h inclusions as late as possible.
* Change new function names to openc_*; update deps.makLaurent Bercot2020-10-2613-15/+15
|
* Prepare for 2.9.4.0; add open*coe() functions.Laurent Bercot2020-10-2613-6/+91
|
* Add stralloc_readyplus_tuned, fix overflow on stralloc_readyplusLaurent Bercot2020-09-171-0/+12
|
* Fix alloc_realloc UBLaurent Bercot2020-04-293-4/+4
| | | | | | | | | | | | | void ** does not exist: the address of a generic pointer is not properly defined (different pointer types may have different representations). So, alloc_realloc cannot exist as is without UB. Fortunately, it's not supposed to be used in the skalibs programming style, and skalibs itself only uses it in two places (stralloc_ready_tuned and stralloc_shrink) where the pointer is a char *. So we just fix the UB by making alloc_realloc() take a char **, and it's only defined for that pointer type. Nothing to see here folks, nothing happened at all.
* bugfix: sigprocmask invocation on non-signalfd systemsLaurent Bercot2020-04-041-1/+1
|
* Explicitly unblock signals when selfpiped without signalfdLaurent Bercot2020-02-262-3/+3
| | | | | | | | | | | | | | | | This is arguably a bugfix, since selfpipe without signalfd relies on signals being actually delivered, and a process may have inherited a nonempty sigprocmask. Also use SIG_BLOCK instead of SIG_SETMASK when using selfpipe_trapset() with signalfd, because we shouldn't unblock signals that may have previously been blocked. This is also arguably a bugfix. This commit is essential for using the version of s6-linux-init that blocks SIGINT before disablecad on kernels without signalfd. Without it, SIGINT never gets unblocked, so it's never delivered to s6-svscan.
* bugfix: env_merge didn't correctly handle variable removalLaurent Bercot2020-02-101-1/+2
|
* Make sagethostname() work with all glibcsLaurent Bercot2020-01-301-4/+11
|
* Real fix for undefined PATH_MAXLaurent Bercot2019-10-201-1/+13
|
* Don't rely on the existence of PATH_MAXLaurent Bercot2019-10-201-2/+1
|
* Fix path_canonicalize()'s returned length when absoluteLaurent Bercot2019-10-101-1/+1
|
* Add path_canonicalize, prepare for 2.9.1.0Laurent Bercot2019-10-091-0/+69
|
* We're down to ONE rogue sysdep, boys. ONE.Laurent Bercot2019-09-206-78/+16
|
* Change tain_now_set_* API: also give an initial valueLaurent Bercot2019-09-063-12/+17
|
* Also better when you actually pull the sysdepsLaurent Bercot2019-09-041-0/+1
|
* With the correct sysdeps macros, pleaseLaurent Bercot2019-09-041-2/+2
|
* Big wallclock/stopwatch refactor. It was long overdue.Laurent Bercot2019-09-039-112/+103
| | | | | | | | | | | | | * --enable-clock and --enable-monotonic are gone * tain_sysclock() has been renamed tain_wallclock_read() * tain_wallclock_read() reads from CLOCK_REALTIME (or gettimeofday()) * tain_clockmon[_init]() have been renamed to tain_stopwatch_[read|init]() and now accept a monotonic clock name as an extra argument * tain_now() points to the system (wall) clock by default * tain_now_set_[stopwatch|wallclock]() can be used to switch Now to make a pass on all skarnet.org programs and add a tain_now_set_stopwatch() call everywhere needed... >.>
* iopause_select: add protection against UB in FD_SETLaurent Bercot2019-08-071-0/+1
|
* bugfix: env_dump() unterminated stringsLaurent Bercot2019-07-311-1/+2
|
* Typo fixLaurent Bercot2019-07-231-1/+1
|
* Factor all the BSD complaints into one new headerLaurent Bercot2019-07-229-44/+22
|
* bits-fmtscan refactor, part twoLaurent Bercot2019-07-197-18/+39
|
* bugfix: memcmp doesn't guarantee not touching bytes after cmp fails.Laurent Bercot2019-07-111-2/+1
|