backgroundでのread2007/11/27 07:36:29

新人君からシェルスクリプトについて質問を受けた。

バックグラウンドでreadコマンドを使うとループしちゃうんですが・・・。

read コマンドがループするんじゃなくて、ループ中に read を入れてるわけですが、 バックグラウンドで端末からの入力を待つなんて、出来ないだろうと思っていたので試したこともなかった。 ちょいと調べてみてわかったのは

バックグラウンドでttyからの入力を待つと、SIGTTYINを受けて異常終了する

ということくらい。(これも正確には正しくないのかも知れないが・・・。)

ps コマンドなんかだと、バックグラウンドで起動したプロセスでも、 tty は紐づいてるみたいに見えるけど、 やっぱり切り離されてるのかな? (表示上だけ紐づいてるように見える?) よくわからん。

とりあえず、新人君には入力待ちを止めさせました。 特に意味もなかったんで。

コメント

_ HeelLifts ― 2016/09/10 12:34:49

I saw a lot of website but I believe this one has got something special
in it.

_ runnning tips ― 2017/01/19 17:34:03

I don't even know how I ended up here, but I thought this post was
good. I don't know who you are but certainly you are going to a famous blogger if you aren't already ;) Cheers!

_ weight loss ― 2017/02/18 14:23:26

Genuinely no matter if someone doesn't know then its up to other viewers that they will assist,
so here it occurs.

_ Toe Spreaders ― 2017/02/19 16:02:18

I truly prize your piece of work, Great post.

_ boosts mental fitness ― 2017/03/02 09:59:51

Hi there! This is kind of off topic but I need some guidance from an established blog.
Is it very hard to set up your own blog? I'm not very techincal but I
can figure things out pretty fast. I'm thinking about making my own but I'm not sure where to begin. Do you have any
points or suggestions? Thanks

_ manicure ― 2017/03/21 18:22:43

Very soon this web page will be famous among all blogging and
site-building users, due to it's good posts

_ manicure ― 2017/03/25 18:40:29

Hi! This is my first visit to your blog! We are a team of volunteers and starting
a new project in a community in the same niche.
Your blog provided us valuable information to work on. You have done a extraordinary job!

_ manicure ― 2017/03/30 20:07:31

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
You definitely know what youre talking about, why waste your intelligence on just posting videos to
your blog when you could be giving us something enlightening to read?

_ manicure ― 2017/03/30 20:23:22

Hi there, just became aware of your blog through Google, and found that it's really informative.
I'm going to watch out for brussels. I'll be grateful if you continue
this in future. Numerous people will be benefited from your writing.
Cheers!

_ manicure ― 2017/03/30 20:27:36

Please let me know if you're looking for a author for your weblog.
You have some really good posts and I think I would be a good asset.
If you ever want to take some of the load off, I'd really like to write
some material for your blog in exchange for a link back to mine.
Please shoot me an e-mail if interested. Many
thanks!

_ manicure ― 2017/03/30 20:31:42

I am extremely inspired along with your writing abilities as neatly as with the structure for your blog.
Is that this a paid subject matter or did you customize it your self?
Anyway keep up the nice high quality writing, it is uncommon to peer a great weblog like this one these days..

_ manicure ― 2017/03/30 20:34:30

I like the helpful information you provide to your articles.
I will bookmark your blog and take a look at once more right here regularly.
I'm somewhat sure I'll be informed many new stuff right right here!
Good luck for the following!

_ manicure ― 2017/03/30 20:43:42

Today, while I was at work, my cousin stole my iPad and tested to see if it can survive a twenty five foot drop,
just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views.
I know this is totally off topic but I had to share it with someone!

_ manicure ― 2017/03/30 21:04:14

We are a bunch of volunteers and starting a brand new scheme
in our community. Your website offered us with useful info
to work on. You've done a formidable task and our whole group will likely be thankful
to you.

_ manicure ― 2017/03/30 21:18:22

I'll right away grab your rss feed as I can't to find your email subscription link or newsletter service.

Do you've any? Kindly permit me realize so that I
may just subscribe. Thanks.

_ manicure ― 2017/03/30 21:28:10

What's up, just wanted to tell you, I liked this blog post.
It was helpful. Keep on posting!

_ manicure ― 2017/03/30 21:31:21

Thanks for finally talking about >backgroundでのread:
/dev/zero <Loved it!

_ manicure ― 2017/03/30 21:37:15

It's fantastic that you are getting ideas from this piece of writing as well as
from our discussion made at this place.

_ manicure ― 2017/03/30 21:44:40

It's hard to come by educated people on this topic, but you seem like you know
what you're talking about! Thanks

_ manicure ― 2017/03/30 21:49:30

Nice weblog here! Additionally your website rather a lot up very fast!
What web host are you the use of? Can I am getting your affiliate hyperlink in your host?
I want my web site loaded up as quickly as yours lol

_ manicure ― 2017/03/30 21:54:23

I like the valuable info you provide in your articles.
I will bookmark your weblog and check again here frequently.
I am quite certain I'll learn many new stuff right here! Best of luck for the next!

_ manicure ― 2017/03/30 22:09:34

Good day! This is my 1st comment here so I just wanted to give a quick shout out and
tell you I really enjoy reading through your posts.

Can you recommend any other blogs/websites/forums that go over the same topics?
Thanks!

_ BHW ― 2017/04/21 17:15:07

Asking questions are really good thing if you are not understanding something entirely, but this post provides fastidious understanding
yet.

_ manicure ― 2017/05/03 11:22:30

Greetings! Very helpful advice within this article! It is the little changes that
make the largest changes. Many thanks for
sharing!

_ manicure ― 2017/05/04 13:09:50

For latest information you have to pay a visit world-wide-web and on internet I found this web page as a finest site for most recent updates.

コメントをどうぞ

※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。

名前:
メールアドレス:
URL:
コメント:

トラックバック

このエントリのトラックバックURL: http://zero.asablo.jp/blog/2007/11/27/2460789/tb

※なお、送られたトラックバックはブログの管理者が確認するまで公開されません。