🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.comp.os.linux
Article #853

Re: 初手问一个脚本的小问题

#853
From: yunhai
Date: Sat, 27 Sep 2008 07:32
30 lines
3476 bytes
On Sat, 27 Sep 2008 13:23:02 +0800, Jian Lee <jian.li@turbolinux.com.cn>  
wrote:

> �滻����exec����Ľ�̣��ٸ����ӣ�
>
> ��һ��terminal���������
> # exec ls
>
> ����ʲô�ˣ��Dz���terminal���ڹر��ˣ�����Ĺ����ǣ�
> terminal���������ls��̣�ls����滻����ĸ���̣�Ҳ����terminal��
> �?terminal��̾Ͳ������ˡ�ls������ϣ��˳��ˣ����ڵ�Ȼ�ر��ˡ�
>
> ��һ�������ǿ��Կ������ ID����һ��terminal��
> # echo $$  ; ���Կ�����ǰ��̵�ID
> # bash  ; �����ڿ���ID��һ�������治һ���ˣ���Ϊ����������һ���µĽ��
> # echo $$ ; ��ס��������صļҳ�ID�ţ����Ϊ ���ס�
> # exec sh
> # echo $$   ; ���ﷵ�صĽ��͡��ס���һ��ġ�

лл��Ľ��͡�

����һЩ�����׵ġ�
��exec���滻��̣�������exec������������&�Ļ�����ôʵ��Ч���Dz��Ǿ͸���exec�����һ����߶���ʹ���µĽ��ID��������terminal��ִ��exec  
opera &��opera &��

�������������ڽű���ʹ��exec���������ֱ����terminal��ִ��exec���е㲻һ��ֱ��ִ��exec  
opera֮�󣬹ر�opera��terminal����Ҳ����֮�رգ�������ڽű����õĻ����ر�opera��ԭ����terminal����رգ����IDҲ���䡣����Ϊʲô�أ���ִ�нű���ʱ�򣬻��¿�һ��bash�𣿿����ڽű��ﲻ��exec�������Ҳû�з��ֶ��һ��bash��

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Technical Details
Message-ID: <op.uh4pv3dd5u2pxgyh@yunyousihai.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.neu.edu.cn!news.cn99.com!not-for-mail
References: <op.uhy15abv5u2pxgyh@yunyousihai.org> <877i9283id.fsf@home.emacser.com> <op.uhy709075u2pxgyh@yunyousihai.org> <7i91dlnk.fsf@dev3-168.dev.cn.tlan> <op.uh2v82dj5u2pxgyh@yunyousihai.org> <abdukvrd.fsf@dev3-168.dev.cn.tlan>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10b277,8e750585191b5336
X-Google-Attributes: gid10b277,domainid0,public,usenet
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.neu.edu.cn!news.cn99.com!not-for-mail
From: yunhai <yunyousihaiAT@gmail.dotcom>
Newsgroups: cn.comp.os.linux
Subject: Re: 初手问一个脚本的小问题
Date: Sat, 27 Sep 2008 15:32:17 +0800
Organization: Bentium Ltd. (CN99)
Lines: 30
Message-ID: <op.uh4pv3dd5u2pxgyh@yunyousihai.org>
References: <op.uhy15abv5u2pxgyh@yunyousihai.org>
 <877i9283id.fsf@home.emacser.com> <op.uhy709075u2pxgyh@yunyousihai.org>
 <7i91dlnk.fsf@dev3-168.dev.cn.tlan> <op.uh2v82dj5u2pxgyh@yunyousihai.org>
 <abdukvrd.fsf@dev3-168.dev.cn.tlan>
NNTP-Posting-Host: 60.180.137.51
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; delsp=yes; charset=gbk
Content-Transfer-Encoding: 8bit
X-Trace: news.cn99.com 1222500734 9179 60.180.137.51 (27 Sep 2008 07:32:14 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Sat, 27 Sep 2008 07:32:14 +0000 (UTC)
X-Face: H>i0Z|HW!UJHXHJ^^.EWI4)91&lsquPlf@5!;9Py+UcBkQM_;c<h!w@K2D_=|j}wRveVA+)2:!]63B,,noBeKnVJc%w3/-*?bYRE4}zHzo_Eb{/OMR<72]LmVcY0Vd1;2=Hl?,7$c_CrQ()%l6,U]Z$.hd=%M9OK<nO<x:+jbQ~6,IX.Ol|uiV4l"Iz(/9,b_E(zI]U@96EMV9BnVwmST{Fm+4IBdaN69xsM4N{8-4h'kl.,&*-#t}5uI2~FhA}:B{jr7XK
User-Agent: Opera Mail/9.60 (Linux)