Article View: cn.bbs.comp.database
Article #10281���æ����һ�� (ת��)
From: ������
Date: Wed, 25 Mar 1998 00:00
Date: Wed, 25 Mar 1998 00:00
59 lines
2260 bytes
2260 bytes
[1;37m�� ��������ת���� [32mUNIX [37m������ ��
�� ԭ����[32m tibet[37m ��� ��[m
����fork()��execl()���˸�С����,Դ��������:
#include <unistd.h>
#include <stdio.h>
main()
{
int pid;
printf("\n--------------------the beginning---------------------\n");
if((pid=fork())==-1)
{
printf("fail to apply a sub process\n");
exit(-1);
}
if(pid==0)
{
if(execl("/home/lsh/hztty-2.0/hztty", "hztty", " -I big2gb -O gb2big", NUL
L)==-1)
{
printf("fail to execute hztty\n");
exit(-1);
}
else printf("hztty is running\n");
{
printf("fail to execute hztty\n");
exit(-1);
}
else printf("hztty is running\n");
}
printf("it seems to be ok!\n");
return;
}
���õ�hztty������ת��gb��big5�ĵ�,���н������:
--------------------the beginning---------------------
it seems to be ok!
bbs:~/example>
[hztty exited]
[hztty started] [using /dev/ttyp4]
date
Fri Feb 20 09:42:52 GMT+8 1998
bbs:~/example>
����date�������������, ����date������, �������Ҳ������, ��������Ԥ�벻��
�Ҿ���Ӧ�������:
--------------------the beginning---------------------
[hztty exited]
[hztty started] [using /dev/ttyp4]
bbs:~/example>date
Fri Feb 20 09:42:52 GMT+8 1998
it seems to be ok!
bbs:~/example>
��˭֪����Ϊʲô������ô? ��Ҫ��Щʲô?
--
[m[1;31m�� ��Դ:���人���ƻƺ�վ s1000e.whnet.edu.cn��[FROM: 202.96.151.219][m
Technical Details
Message-ID:
<3NcYI8$X8_@bbs.whnet.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: 101948,2e8771d143a3f8f5,start X-Google-Attributes: gid101948,public From: alligator.bbs@bbs.whnet.edu.cn (������) Subject: ���æ����һ�� (ת��) Date: 1998/03/25 Message-ID: <3NcYI8$X8_@bbs.whnet.edu.cn> X-Deja-AN: 337224733 X-Filename: Database/M.890787176.A Organization: �人���ƻƺ�վ Newsgroups: cn.bbs.comp.database