今天编译了一个网页控制led程序,准备用ftp下载到开发板运行时却出现了:
ftp> put led-player
local: led-player remote: led-player
200 PORT command successful.
553 led-player: Text file busy.
原因:
因为我在之前测试过一个led程序,退出进程时是按ctrl+z(其实是挂起进程),并没有完全将进程退出,所以进程依然占据着/dev/buttons/。ctrl+c可以结束进程。
解决办法:
1、ps查看当前正在运行的进程:
[root@FriendlyARM plg]# ps
PID USER VSZ STAT COMMAND
1 root 3068 S init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [events/0]
5 root 0 SW [khelper]
11 root 0 SW [async/mgr]
209 root 0 SW [sync_supers]
211 root 0 SW [bdi-default]
213 root 0 SW [kblockd/0]
222 root 0 SW [khubd]
228 root 0 SW [kmmcd]
244 root 0 SW [rpciod/0]
251 root 0 SW [kswapd0]
298 root 0 SW [aio/0]
302 root 0 SW [nfsiod]
306 root 0 SW [crypto/0]
416 root 0 SW [mtdblockd]
628 root 0 SW [usbhid_resumer]
672 root 3068 S syslogd
675 root 3388 S /usr/sbin/inetd
679 root 1940 S /usr/sbin/boa
682 root 1416 T /usr/bin/led-player
691 root 18572 S /opt/Qtopia/bin/qpe
692 root 3392 S -/bin/sh
693 root 3068 S init
694 root 3068 S init
699 root 3068 S init
709 root 8892 S < /opt/Qtopia/bin/qss
710 root 12432 S N /opt/Qtopia/bin/quicklauncher
721 root 12392 S /opt/Qtopia/bin/led-testing
728 root 0 SW [flush-31:0]
733 root 1416 T ./led-player
735 plg 2324 S ftpd: 192.168.1.108: plg: STOR led-player
737 root 3392 R ps
//找到./led-player的进程号为733。
2、用kill命令终止进程:
[root@FriendlyARM plg]# kill -9 733
[1] + Killed ./led-player
//其中-9表示强迫进程立即停止,733是上面./led-player的进程号
阅读(2614) | 评论(0) | 转发(0) |