04-23-2009
9 More Discussions You Might Find Interesting
1. Programming
When run it, segment fault.
What is wrong?
#include <stdio.h>
#include <stdlib.h>
const int max =20;
//****************************************************
// Input Matrix
//****************************************************
void inMatrixAA(int *AA, int row, int col)... (9 Replies)
Discussion started by: zhshqzyc
9 Replies
2. IP Networking
I do have 2 different segment network which different platform on each segment. E.g. 20 segment, Windows OS can talk to Unix OS and 21 segment practice same rule. Further more, Windows OS from 20 segment can talk to 21 segment other OS but only the UNIX OS in 20 segment fail to talk to 21 segment.... (3 Replies)
Discussion started by: HASM
3 Replies
3. Shell Programming and Scripting
Hey all, could someone please direct me on how to extract a segment from a file between two tags? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies
4. Programming
I mean, I malloc a segment of memory, maybe 1k maybe 20bytes.. assume the pointer is pMem How can I know the content pMem refered is all Zero or \0 . I know memcmp but the second parameter should another memory address... thanx (4 Replies)
Discussion started by: macroideal
4 Replies
5. Programming
Hi to all.
I'm reciving a "Segment violation" error from this code and I don't know why.
void insertAtEnd(NodeType *pList) {
char element;
printf("Introduce a element: \n");
setbuf(stdin, NULL);
scanf("%c", &element);
//Find the end of the list;
while... (4 Replies)
Discussion started by: daniel.gbaena
4 Replies
6. Programming
Hi,
Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment?
char *a = "Hello";
I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies
7. Programming
I always get segment fault, why? can sb help me and modify it, I have spend on much time on
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <string.h>
#define MAX 10
pthread_t thread;
void *thread1()
{
int *a;
int i, n;
... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
8. Shell Programming and Scripting
fuser -OdV /temp
This command returns the output below;
inode=132 size=10871 fd=2 5046330
inode=570 size=292 fd=1 5439528
inode=259 size=2669 fd=1 5570758
inode=759 size=255 fd=1 6226124
inode=636 size=1035 fd=1 ... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
9. Shell Programming and Scripting
I have a file with a combination of binary characters and words, and need to trim out the segment i.e. SleeperThreadAborting {{username::RAB2002}} {{scriptname::scs_get_pending_by_loc}} and put the lists into a text file.
Luckily, the segment I am looking for i.e. has readable words ... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
LEARN ABOUT NETBSD
lfs_segwait
LFS_SEGWAIT(2) BSD System Calls Manual LFS_SEGWAIT(2)
NAME
lfs_segwait -- wait until a segment is written
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/types.h>
int
lfs_segwait(fsid_t *fsidp, struct timeval *tv);
DESCRIPTION
lfs_segwait() blocks until a new segment is acquired for writing by the filesystem specified by *fsidp or if *fsidp is -1, until a segment is
acquired for writing by any LFS filesystem.
If timeout is non-zero, lfs_segwait() will return after timeout milliseconds regardless of whether a new segment has been designated for
writing or not.
RETURN VALUES
lfs_segwait() returns 0 if a new segment was acquired; 1 if it timed out; or -1 on error.
ERRORS
An error return from lfs_segwait() indicates:
[EFAULT] fsidp points outside the process's allocated address space.
[EINTR] A signal was delivered before the time limit expired and before a new segment was designated for writing.
[EINVAL] The specified time limit is negative.
SEE ALSO
lfs_bmapv(2), lfs_markv(2), lfs_segclean(2), lfs_cleanerd(8)
HISTORY
The lfs_segwait() function call appeared in 4.4BSD.
BSD
May 23, 2000 BSD