Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a program for basic file reading/writing. When I added lseek, a function new to me it did not terminate. I have tried to use the following commands to get it to do so:

kill PID 
kill -9 PID 
killall Processname 

I have disconnected the telnet session, but the host is still reachable.

Since it is a BSP for an embedded device, it does not support all commands. For instance, ps will only return:

1001 root       0:00 ./07-7 

I have found How is it possible that kill -9 for a process on Linux has no effect? but due to the previously mentioned limitation I can not see ps STAT, or execute ps axopid,comm,wchan.

Since the board is on a remote location, with no-one in place and other users in need to use it over the weekend, I do not want to reboot it. I can also not just let the program run, since it has a lock on a shared file needed by others. Any advice would be appreciated!


write(fd, pix1, 64);
lseek(fd, -19, SEEK_SET); //added last, after which it did not recover
read(fd, pix2, 64);
share|improve this question

migrated from Dec 8 '12 at 16:04

This question came from our site for professional and enthusiast programmers.

Bizarre... It won't respond to kill -9? How about sudo kill -9? – Linuxios Dec 7 '12 at 22:11
After reading the other question, I suspect the failing storage medium sleep. Can you launch another process (with a timeout) to see if the storage medium is failing? – Linuxios Dec 7 '12 at 22:14
@Linuxios I am logged in as root, the only user possible on this board. – Tom Dec 7 '12 at 22:17
Hm. Very, very odd. What kind of storage medium is it, and are they custom drivers, or Linux drivers. (eg. is it SATA or PATA, or is it something odd and exotic)? – Linuxios Dec 7 '12 at 22:19
I can still write to other files on the disk. I can not write to the particular file which is locked by open() in the stalling program – Tom Dec 7 '12 at 22:20

You must log in to answer this question.

Browse other questions tagged .