Hi all,
I am playing around with redirection and am getting the below error message?
can anyone tell me a cause for this so i can fix it?
thanksCode:ls: write error: Bad file descriptor
Techevo
Printable View
Hi all,
I am playing around with redirection and am getting the below error message?
can anyone tell me a cause for this so i can fix it?
thanksCode:ls: write error: Bad file descriptor
Techevo
the command i use to get this was:
Code:ls > file.txt
If the error comes in a regular shell then the problem is that your quota or storage memory exceeded.
If you are trying to create your own shell then the problem may be in your program.
Also check the resources using ulimit -a command, I think you are facing some lack of resources issue
Yes i am creating my own shell.
Thank you for all the suggestions,
the result of
is as followsCode:command -a
thanks againCode:core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
techevo
You need to post some of your own code, for your own shell then.
There's no end of ways you could have screwed up the file descriptors.