Revision c76da3dae3d7241a93fa88fb728b49687a3edae5 authored by Piotr Esden-Tempski on 12 November 2013, 03:39:03 UTC, committed by Felix Ruess on 18 November 2013, 23:27:54 UTC
We are now checking if the input channel is empty when receiving the IN callback. If that is the case we assume that the child process exitted, ond call the close process callback that normally is treggered by the HUP callback. Some background: On OS X glib is using it's own implementation of poll that does not generate the HUP signal. (It would be possible to add this functionality modelled after the SSH implementation of bsd_poll) The glib implementation does generate IN signal when the pipe get's closed. So we can just check if the input channel is empty and if that is the case infer that the pipe got closed.
1 parent e180f58
Makefile.lpctools
# Hey Emacs, this is a -*- makefile -*-
bl:
cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)
BOOTLOADER_DEV ?= /dev/ttyUSB0
upload_bl bl.upload: bl
lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000
JTAG_INTERFACE ?= olimex-jtag-tiny.cfg
#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
upload_jtag: bl
openocd -f interface/$(JTAG_INTERFACE) -f board/olimex_lpc_h2148.cfg -c init -c halt -c "flash write_image erase $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex" -c reset -c shutdown
lpc21iap:
$(MAKE) -C sw/ground_segment/lpc21iap
upgrade_bl bl.upgrade: bl lpc21iap
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
ms:
$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb
$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb/examples
upload_ms ms.upload: ms
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
.PHONY: bl upload_bl upload_jtag ms upload_ms lpc21iap upgrade_bl
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...