求助: system shell 高手进

sh/bash/dash/ksh/zsh等Shell脚本
回复
zxc381219
帖子: 1
注册时间: 2009-08-04 17:24

求助: system shell 高手进

#1

帖子 zxc381219 » 2009-08-04 17:25

最近遇到一个问题,我的一个linux进程(非常大,占用机器70%的内存),在进程运行过程中,我想执行一个shell命令,起初是调用system("shell命令"),但是system会fork一个子进程来完成这个操作,但是这时内存已经不够用(不足以复制出新的子进程), 请问各位牛人,怎么办,什么手段都行。
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 求助: system shell 高手进

#2

帖子 leeaman » 2009-08-04 17:27

ee快来~~~
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
cnkilior
论坛版主
帖子: 4984
注册时间: 2007-08-05 17:40

Re: 求助: system shell 高手进

#3

帖子 cnkilior » 2009-08-04 21:32

vfork?
头像
x007007007
帖子: 408
注册时间: 2007-11-07 17:53
系统: Mac
来自: shanghai
联系:

Re: 求助: system shell 高手进

#4

帖子 x007007007 » 2009-08-05 12:24

不明白
人生来只做的两件事:
1.犯错
2.改错
只犯错不改错的是魔鬼,只改错不犯错的是上帝
总之,都不是人!!!!!!!!!!!!!
我的地盘
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 求助: system shell 高手进

#5

帖子 eexpress » 2009-08-05 12:27

什么语言里面调的嘛
``试试。
● 鸣学
头像
O_O_BOT
帖子: 2461
注册时间: 2009-05-20 19:32

Re: 求助: system shell 高手进

#6

帖子 O_O_BOT » 2009-08-08 22:24

exec
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录

http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

Re: 求助: system shell 高手进

#7

帖子 BigSnake.NET » 2009-08-08 22:33

用 vfork
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
回复