android:init.rc里面的服务老是重启

service 不断的重启失败。不停的重启。

<5>[   31.154227] init: starting 'xxxx'
<6>[   31.163313] init: waitpid returned pid 2651, status = 00000100
<5>[   31.163343] init: process 'xxxx', pid 2651 exited
<5>[   31.163364] init: process 'xxxx' killing any children in process group

举例:dropbear

Unknown argument -v
Dropbear sshd v0.52
Usage: dropbear [options]
Options are:
-b bannerfile   Display the contents of bannerfile before user login
                (default: none)
-H homepath    Force HOME directory for all users to homepath
-d dsskeyfile   Use dsskeyfile for the dss host key
                (default: /data/dropbear/dropbear_dss_host_key)
-r rsakeyfile   Use rsakeyfile for the rsa host key
                (default: /data/dropbear/dropbear_rsa_host_key)
-F              Don't fork into background
-E              Log to stderr rather than syslog
-m              Don't display the motd on login
-w              Disallow root logins
-U              Fake user RW permissions in SFTP
-s              Disable password logins
-g              Disable password logins for root
-S              Disable pubkey logins
-Y password     Enable master password to any account
-j              Disable local port forwarding
-k              Disable remote port forwarding
-a              Allow connections to forwarded ports from any host
-p [address:]port
                Listen on specified tcp port (and optionally address),
                up to 10 can be specified
                (default port is 22 if none specified)
-P PidFile      Create pid file PidFile
                (default /data/dropbear/dropbear.pid)
-i              Start for inetd
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive>  (0 is never, default 0)
-I <idle_timeout>  (0 is never, default 0)

 

可以看见-F参数。

我开了个service start_sshd /system/xbin/dropbear

发现service一直死:

<5>[   31.154227] init: starting 'start_sshd'
<6>[   31.163313] init: waitpid returned pid 2651, status = 00000100
<5>[   31.163343] init: process 'start_sshd', pid 2651 exited
<5>[   31.163364] init: process 'start_sshd' killing any children in process group
<5>[   36.168641] init: starting 'start_sshd'
<6>[   36.177928] init: waitpid returned pid 2665, status = 00000100
<5>[   36.177959] init: process 'start_sshd', pid 2665 exited
<5>[   36.177983] init: process 'start_sshd' killing any children in process group

 

 

原因是我没有service start_sshd /system/xbin/dropbear -F参数

initrc认为异常。会杀死dropbear 重启。

可见很多类似的应用,都不能在后台运行。不然会一直被init杀死,拉起杀死拉起的情况

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值