Я не полагаю, что это возможно со встроенной функциональностью Bash.
Вы можете получать уведомление, когда ребенок выходит:
#!/bin/sh
set -o monitor # enable script job control
trap 'echo "child died"' CHLD
Однако нет никакого очевидного способа получить статус выхода ребенка в обработчике сигналов.
Получение того дочернего состояния обычно является заданием wait
семья функций в более низких API POSIX уровня. К сожалению, поддержка Bash этого ограничена - можно ожидать один определенный дочерний процесс (и получить его статус выхода), или можно ожидать весь из них, и всегда получать 0 результатов.
то, Что кажется невозможным сделать, является эквивалентом waitpid(-1)
, какие блоки до любой дочерний процесс возвращает.
If you export the functions from using a DEF file and manually specify the ordinals, you should be able to accomplish this.
Reference
http://msdn.microsoft.com/en-us/library/d91k01sh(VS.80).aspx
As long as you don't add any exported symbols, the ordinals won't change. If you add exported symbols through the standard dllexport mechanism, then that's going to be difficult to control. If you use the old style .xpf symbol file you might be able to control the ordering of the symbols in the lib (although I don't know this for sure - it might still reorder them however it likes), but it's tricky to do C++ symbols this way.
I think that ordinals are rarely used to resolve DLL imports anymore - I think that you have to use .def files to get the linker to use them. So as long as you don't change names or signatures of the exported functions, the .exe should work just fine.
It depends on how your EXE used the classes from the DLL. Adding new classes should not affect existing entrypoints. Aside from that, however, any the following will affect object size and/or layout, and as such will be a client-breaking change (note that this is technically VC-specific, but most of these apply to any sane implementation):