ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Sheplyakov <asheplyakov@basealt.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] sysvinit + udev
Date: Wed, 30 Dec 2020 18:22:46 +0400
Message-ID: <d268a2a1-d5fc-14b7-96b8-1bf9759f8718@basealt.ru> (raw)
In-Reply-To: <20201215041557.GI21271@altlinux.org>

Добрый вечер!

On 12/15/20 8:15 AM, Alexey V. Vissarionov wrote:
> On 2020-12-15 10:38:47 +0700, Антон Мидюков wrote:
> 
>   >>>>> /dev/stderr -> /proc/self/fd/2
>   >>>>> /dev/stdout -> /proc/self/fd/1
>   >>>>> /dev/stdin -> /proc/self/fd/0
>   >>>>> /dev/fd -> /proc/self/fd/
>   >>>> Какой в них смысл, если они всегда указывают в /proc/self ?
>   >>> Сломался startup-mediacheck, а именно:
>   >>> while read i; do
>   >>> done < <(checkisomd5 --gauge "$dev" 2>&1) # hence bash
>   >>> без /dev/fd не работает.
>   >> Значит, и чинить надо именно startup-mediacheck - просто потому,
>   >> что все необходимое для работы ему доступно и без костыля.
>   > Но проблема то шире. Некоторые bash-скрипты не будут работать
>   > на sysvinit из-за отсутствия /dev/fd. Очевидно же?
> 
> Ну вот эти скрипты и надо чинить. Вместо /dev/fd/ использовать
> /proc/self/fd/, вместо /dev/stdin - /proc/self/fd/0 итд.

P - portability

/dev/stdin есть во многих *NIX, а /proc/self/fd - только в Linux.
Потому есть много программ (не только скриптов) и, что более
существенно - документации, где используется именно /dev/stdin.
Чинить их все - сильно затратно, проще сделать, чтоб был /dev/stdin

(прошу прощения за тормозной путь в 2 недели)


  reply	other threads:[~2020-12-30 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 17:15 Антон Мидюков
2020-12-11 17:27 ` Alexey Gladkov
2020-12-11 17:35   ` Vladislav Zavjalov
2020-12-11 17:55     ` Alexey Gladkov
2020-12-12  1:28 ` Alexey V. Vissarionov
2020-12-14 19:31   ` Антон Мидюков
2020-12-15  3:23     ` Alexey V. Vissarionov
2020-12-15  3:38       ` Антон Мидюков
2020-12-15  4:15         ` Alexey V. Vissarionov
2020-12-30 14:22           ` Alexey Sheplyakov [this message]
2020-12-30 14:26             ` Alexey Gladkov

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=d268a2a1-d5fc-14b7-96b8-1bf9759f8718@basealt.ru \
    --to=asheplyakov@basealt.ru \
    --cc=devel@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 Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

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


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