06-14-2011
Is Drive Valid Segfault
I have a program that allows users to specify the debug log file location and name.
I have tried using the access() and stat() but they both segfault if the drive say (d:\) is invalid. Both seem to be fine if the drive exists.
Could someone please point me in the direction to a function that will work or pointers on how to make the aforementioned functions to work.
thanks,
Rob.
10 More Discussions You Might Find Interesting
1. Programming
i am trying to use the history functions in a c++ program along with a custom signal handler for SIGINT.
the prog works fine catching signals without the line:
add_history(*args);
but as soon as this line is added, the prog segfaults on SIGINT.
does anyone have experience using gnu... (2 Replies)
Discussion started by: a1g0rithm
2 Replies
2. UNIX for Dummies Questions & Answers
Hello, sorry if this has been posted before but i was wondering if there is a way to run a program until a segmentation fault is found.
Currently i'm using a simple shell script which runs my program 100 times, sleeps 1 second because srand(time(0)) is dependent on seconds. Is there a possible... (1 Reply)
Discussion started by: aslambilal
1 Replies
3. Programming
After allocating memory for some variables, segfault is often to happen, due to the same reason: Address 0x1cd00000103 out of bounds
It is welcome to recommend some treatments. Thanks
e.g.
is_done = 0x1cd00000103 <Address 0x1cd00000103 out of bounds>,
hood = 0x23c00000247,
c =... (11 Replies)
Discussion started by: cdbug
11 Replies
4. Solaris
We have a Solaris 8 server which users login to via VNC to get a desktop. On that desktop these users use Netscape Communicator 4.9 to access a very important mail account. Unfortunately Netscape has started segfaulting regularly.
Does anyone have any ideas how I can try to find out what point... (1 Reply)
Discussion started by: aussieos
1 Replies
5. Programming
1. Even if i have the handles for ctrl+c it gives off a segfault
2. syslog doesn't log LOG_ERR event with log masked specified or non specified, it logs LOG_WARNING however...
#include <sys/types.h> /* include this before any other sys headers */
#include <sys/stat.h>
#include <fcntl.h>... (2 Replies)
Discussion started by: james2432
2 Replies
6. Programming
Hello everyone,
I'm writing a program using the id3lib unfortunately I've encountered with memory issue that cause segmentation fault. I tried to rerun and analyze the program with valgrind but it doesn't point me anywhere. I really stuck on this one.
Valgrind output:
==14716== Invalid read of... (2 Replies)
Discussion started by: errb
2 Replies
7. UNIX for Dummies Questions & Answers
So the title kinda says it all. I was getting a SEGfault, so I decided to compile with the -g option to find where, and low and behold the SEGfault doesn't occur.
I suppose the answer is "Problem solved! You fixed yet another SEGfault." But I am very curious how this could have happened.
... (3 Replies)
Discussion started by: drbones
3 Replies
8. Programming
hello all,
my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic.
... (4 Replies)
Discussion started by: zius_oram
4 Replies
9. Programming
I am populating an array of string and print it.
But it going in infinite loop and causing segfault.
char Name = {
"yahoo",
"rediff",
"facebook",
NULL
};
main(int argc, char* argv)
{
int j = 0;
... (7 Replies)
Discussion started by: rupeshkp728
7 Replies
10. Programming
Another project, another bump in the road and another chance to learn. I've been trying to open gzipped files and parse data from them and hit a snag. I have data in gzips with a place followed by an ip or ip range sort of like this:
Some place:x.x.x.x-x.x.x.x
I was able to modify some code... (6 Replies)
Discussion started by: Azrael
6 Replies
LEARN ABOUT DEBIAN
scsi-spin
scsi-spin(8) System Manager's Manual scsi-spin(8)
NAME
scsi-spin - spin up and down a SCSI device
SYNOPSIS
scsi-spin [-options...] [device]
DESCRIPTION
scsi-spin let the user to manually spin up and down a SCSI device.
This command is particularly useful if you've got noisy (or hot) drives in a machine that you rarely need to access. This is not the same
as the kernel patch that's floating around that will automatically spin down the drive after some time. scsi-spin is completely manual,
and spinning down a drive that's in use, especially the one containing the scsi-spin binary, is probably a really bad idea.
To avoid running in trouble with such cases, scsi-spin verifies that the device to work on is not currently in use by scanning the mounted
file system description file for a partition living on it and issue an error if this the case.
OPTIONS
-u, --up
spin up device.
-d, --down
spin down device.
-e, --loej
load or eject medium from drive (use along with -u or -d )
-w, --wait=[n]
wait up to n seconds for the spin up/down command to complete. Default is to return immediately after the command was sent to the
device. Either repeat -w n times or set n to define the time to wait before to report a timeout.
-l, --lock
prevent removal of medium from device.
-L, --unlock
allow removal of medium from device.
-I, --oldioctl
use legacy ioctl interface instead of SG_IO to dialog with device (could not be supported on all platforms). -e and -w are not
allowed with this option.
-v, --verbose=[n]
verbose mode. Either repeat -v or set n accordingly to increase verbosity. 1 is verbose, 2 is debug (dump SCSI commands and Sense
buffer).
-f, --force
force spinning up/down the device even if it is in use.
-n, --noact
do nothing but check if the device is in use.
-p, --proc
use /proc/mounts instead of /etc/mtab to determine if the device is in use or not.
device the device is any name in the filesystem which points to a SCSI block device (sd, scd) or generic SCSI device (sg). See section
below.
SCSI devices naming convention
Old kernel naming convention
It is typically /dev/sd[a-z] , /dev/scd[0-9]* or /dev/sg[0-9]*.
scsidev naming convention
It is typically /dev/scsi/s[rdg]h[0-9]*-e????c?i?l? or /dev/scsi/<aliasname>.
devfs naming convention
It is typically /dev/scsi/host[0-9]/bus[0-9]/target[0-9]/lun[0-9]/disc (same for cd and generic devices) or short name
/dev/sd/c[0-9]b[0-9]t[0-9]u[0-9] when devfsd "new compatibility entries" naming scheme is enabled.
SEE ALSO
scsiinfo(8), sg_start(8), sd(4), proc(5),
AUTHORS
Eric Delaunay <delaunay@debian.org>, 2001
Rob Browning <rlb@cs.utexas.edu>, 1998
03 September 2001 scsi-spin(8)