Ошибка простого цикла оболочки в Makefile

Я нашел эти комментарии(source1 , source2)Клемента Лефебра (главного разработчика Mint ), которые могут оказаться полезными:

It hangs because the MDM slave fails to detect that the x-session-manager has died (you can see that in the process list.. it's "defunct").

The way that normally works is that MDM receives a SIGCHLD signal from its child process x-session-manager. Now.. if anything you're running intercepts SIGCHLD signals, that can mess with this. I recently worked on gnome-keyring 3.14 for instance, which had that problem.

GNOME/gnome-keyring@a942c8f

Is there anything you're running messing with sigaction calls and/or intercepting SIGCHLD signals? If in doubt, try to remove what you installed (teamviewer for instance) and try to reproduce the issue more and more with less and less applications running to see which one could be causing this problem.

Here's a quick way to troubleshoot it:

Save this script http://pastebin.com/ggzU6U7V into a new file called check_signals and make it executable.

Next, run check_signals on the process IDs you suspect. It will tell you if they intercept SIGCHLD.

For instance, if I run check_signals on my MDM slave process (the parent mdm process is the daemon, the child one is the slave), I get:

Ign: SIGUSR1 (10), SIGPIPE (13), SIGPWR (30) Cgt: SIGINT (2), SIGUSR2 (12), SIGTERM (15), SIGCHLD (17), SIGXFSZ (25), SIGNUM32 (32), SIGNUM33 (33)

0
03.11.2019, 14:47
1 ответ

Это также не должно работать вне Makefile, потому что doи doneотсутствуют:

l='abc de f'; for k in $l; do echo $k; done # this works

В Makefile нужно экранировать $, и он становится:

    l='abc de f'; for k in $$l; do echo $$k; done
1
28.01.2020, 03:09

Теги

Похожие вопросы