core-lightning/lightningd
Simon Vrouwe ae4623c21a lightingd: removal of sigchild_handler in shutdown now also closes its pipe
Setting SIGCHLD back to default (i.e. ignored) makes waitpid hang on an
old SIGCHLD that was still in the pipe?

This happens running test_important_plugin with developer=1:
(or with dev=0 and build-in plugins subscribed to "shutdown")

0  0x00007ff8336b6437 in __GI___waitpid (pid=-1, stat_loc=0x0, options=1) at ../sysdeps/unix/sysv/linux/waitpid.c:30
1  0x000055fb468f733a in sigchld_rfd_in (conn=0x55fb47c7cfc8, ld=0x55fb47bdce58) at lightningd/lightningd.c:785
2  0x000055fb469bcc6b in next_plan (conn=0x55fb47c7cfc8, plan=0x55fb47c7cfe8) at ccan/ccan/io/io.c:59
3  0x000055fb469bd80b in do_plan (conn=0x55fb47c7cfc8, plan=0x55fb47c7cfe8, idle_on_epipe=false) at ccan/ccan/io/io.c:407
4  0x000055fb469bd849 in io_ready (conn=0x55fb47c7cfc8, pollflags=1) at ccan/ccan/io/io.c:417
5  0x000055fb469bfa26 in io_loop (timers=0x55fb47c41198, expired=0x7ffdf4be9028) at ccan/ccan/io/poll.c:453
6  0x000055fb468f1be9 in io_loop_with_timers (ld=0x55fb47bdce58) at lightningd/io_loop_with_timers.c:21
7  0x000055fb46924817 in shutdown_plugins (ld=0x55fb47bdce58) at lightningd/plugin.c:2114
8  0x000055fb468f7c92 in main (argc=22, argv=0x7ffdf4be9228) at lightningd/lightningd.c:1195
2021-11-30 13:34:44 +10:30
..
test log: don't leak log prefixes. 2021-11-27 10:38:13 +10:30
.gitignore Ignore all the deamon inside the git history 2021-10-28 15:51:38 +02:00
bitcoind.c lightningd: remove some unnneded notleak(). 2021-11-27 10:38:13 +10:30
bitcoind.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
chaintopology.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
chaintopology.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
channel_control.c lightningd: remove some unnneded notleak(). 2021-11-27 10:38:13 +10:30
channel_control.h channeld: add a message to read if we only want to reestablish. 2021-06-25 13:23:28 +09:30
channel_state.h channel-state: add two new states, for dualopend 2021-01-10 13:44:04 +01:00
channel.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
channel.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
closing_control.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
closing_control.h lightningd/closing_control.c: move json_close here from peer_control.c 2021-09-15 18:23:30 +02:00
coin_mvts.c cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
coin_mvts.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
connect_control.c experimental-websocket-port: option to create a WebSocket port. 2021-10-22 11:56:30 +02:00
connect_control.h lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
datastore.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
dual_open_control.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
dual_open_control.h openingd/dualopend: remove send_msg functionality. 2021-06-03 16:16:34 +09:30
gossip_control.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
gossip_control.h gossipd: get fed the blockheight from lightningd when we know it. 2019-09-25 04:01:56 +00:00
gossip_msg.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
gossip_msg.h lease_rates: parse them out of node_announcements 2021-07-20 13:28:38 -04:00
hsm_control.c hsmd: derive an onion_reply secret. 2021-09-22 09:10:34 +09:30
hsm_control.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
htlc_end.c htlcs: add flag to 'fail immediately' 2021-10-23 12:59:13 +02:00
htlc_end.h htlcs: add flag to 'fail immediately' 2021-10-23 12:59:13 +02:00
htlc_set.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
htlc_set.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
invoice.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
invoice.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
io_loop_with_timers.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
io_loop_with_timers.h lightningd/io_loop_with_timers.c: Move mainloop to its own source file, have chaintopology use it. 2019-05-31 17:57:10 +02:00
json.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
json.h common: hoist param_bitcoin_address where plugins can use it. 2020-08-11 08:39:24 +09:30
jsonrpc.c JSON RPC: Calls made in shutdown loop receive error code -5: LIGHTNINGD_SHUTDOWN 2021-11-30 13:34:44 +10:30
jsonrpc.h lightningd: cleanup, freeing jsonrpc in shutdown cannot trigger db write's anymore 2021-11-30 13:34:44 +10:30
lightningd.c lightingd: removal of sigchild_handler in shutdown now also closes its pipe 2021-11-30 13:34:44 +10:30
lightningd.h memleak: make notleak use the tal name instead of a boutique struct. 2021-11-27 10:38:13 +10:30
log_status.c common: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
log_status.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
log.c log: don't leak log prefixes. 2021-11-27 10:38:13 +10:30
log.h log: don't leak log prefixes. 2021-11-27 10:38:13 +10:30
Makefile lightningd: blindedpath helper to create a blinded path to ourselves. 2021-09-22 09:10:34 +09:30
memdump.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
memdump.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
notification.c log: don't leak log prefixes. 2021-11-27 10:38:13 +10:30
notification.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
offer.c BOLT12: use point32 instead of pubkey32. 2021-10-08 13:47:30 +02:00
onchain_control.c wallet: only hand onchaind the HTLCs it needs to know. 2021-10-15 12:09:36 +02:00
onchain_control.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
onion_message.c onion_message: dev options to ignore obsolete/modern onions. 2021-10-04 11:58:31 +02:00
onion_message.h wire: import new onion message spec. 2021-09-22 09:10:34 +09:30
opening_common.c lightningd: new option for htlc dust limit 2021-10-23 12:59:13 +02:00
opening_common.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
opening_control.c fundchannel_complete: remove deprecated txid/txout params. 2021-11-14 18:49:46 +01:00
opening_control.h openingd/dualopend: remove send_msg functionality. 2021-06-03 16:16:34 +09:30
options.c chore: use EXPERIMENTAL for BOLT7 DNS #911 2021-11-30 09:38:17 +10:30
options.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
pay.c pay: Fail a sendpay or sendonion that'd produce a DB collision 2021-10-13 13:41:18 +10:30
pay.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
peer_control.c custommsg hook: remove message field. 2021-11-14 18:49:46 +01:00
peer_control.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
peer_htlcs.c peer: Wrap the HTLC out destructor in a DB transaction 2021-10-31 13:11:34 +01:00
peer_htlcs.h db: Add groupid to HTLCs 2021-10-13 13:41:18 +10:30
ping.c channeld: restore ping command, but only for channeld. 2021-10-10 15:32:57 +02:00
ping.h ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
plugin_control.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
plugin_control.h plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_hook.c lightningd: shutdown plugins after subdaemons and assert no write access to db 2021-11-30 13:34:44 +10:30
plugin_hook.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
plugin.c JSON RPC: In the shutdown loop, ignore plugin responses to JSON RPC requests 2021-11-30 13:34:44 +10:30
plugin.h lightningd: shutdown plugins after subdaemons and assert no write access to db 2021-11-30 13:34:44 +10:30
routehint.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
routehint.h invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
signmessage.c cleanup: remove unneeded includes in C files. 2021-09-17 09:43:22 +09:30
subd.c lightningd: fix compilation error on OpenBSD 2021-11-17 14:53:30 +10:30
subd.h lightningd: don't send other messages until we've received version. 2021-04-24 13:56:58 +09:30
watch.c common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
watch.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00