ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Kharitonov A. Dmitry" <kharpost@rambler.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] Как убить потомка?
Date: Mon, 01 Dec 2008 02:37:10 +0300
Message-ID: <493323A6.50801@rambler.ru> (raw)
In-Reply-To: <2876aabc0811301456q7c093e39y48f57e1cab288269@mail.gmail.com>

Dmitry Chistikov пишет:
>> Это красивое решение. Вы мне предлагали сделать цикл с while или for, ps,
>> grep, sed или cut. А тут одна команда.
>>     
>
> Нет-нет, что Вы, какие циклы. Мое решение:
>
> kill `ps -o pid= --ppid 1150`
>
> или
>
> ps -o pid= --ppid 1150 | xargs kill
>
> Я предполагал, что если Вы уже неплохо пишете скрипты, то должны быть
> знакомы с command substitution, а потому воспринял слова о
> зависимостях в смысле необходимости обойти целое поддерево дерева
> процессов. Тем не менее, открыть для себя эту возможность Shell'а и, в
> качестве некоторой альтернативы, утилиту xargs никогда не поздно!
>   
Если вы знали ответ, то сообщили бы сразу ответ: ps -o pid= --ppid, с 
экономили бы своё время и моё.
Спасибо с ключем -о я экспериментировал, но до связки с --ppid не догадался.

kill `ps -o pid= --ppid 1150` работает не так, как мне хотелось бы. Почему-то убивает не всех. pkill убивает

В другом месте примерно такая модель
{ sleep 100; }& { sleep 100; }& { while true; do sleep 10; echo hello1; done; }& { sleep 100; echo hello2; } & ps -j
Здесь придётся писать скрипт.

> Да, на всякий случай предложу идею по поводу wget'ов: не убивать их, а
> останавливать (а после восстановления соединения - продолжать;
> возможно, Вы уже так делаете?).
>   
Считываемые данные замораживаются только на момент передачи. Продолжать 
с момента разрыва не получится.

Спасибо за помощь.



  reply	other threads:[~2008-11-30 23:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30 20:53 Kharitonov A. Dmitry
2008-11-30 21:13 ` Dmitry Chistikov
2008-11-30 21:23   ` Kharitonov A. Dmitry
2008-11-30 21:35     ` Dmitry Chistikov
2008-11-30 21:48       ` Kharitonov A. Dmitry
2008-11-30 21:51         ` Dmitry Chistikov
2008-11-30 21:57           ` Kharitonov A. Dmitry
2008-11-30 22:04             ` Dmitry Chistikov
2008-11-30 22:22               ` Kharitonov A. Dmitry
2008-11-30 22:34                 ` Dmitry Chistikov
2008-11-30 22:41                   ` Kharitonov A. Dmitry
2008-11-30 22:56                     ` Dmitry Chistikov
2008-11-30 23:37                       ` Kharitonov A. Dmitry [this message]
2008-12-01  9:25 ` Konstantin S. Uvarin
2008-12-01 13:52   ` Kharitonov A. Dmitry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493323A6.50801@rambler.ru \
    --to=kharpost@rambler.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git