Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uucopy(2) [opensolaris man page]

uucopy(2)							   System Calls 							 uucopy(2)

NAME
uucopy - no-fault memory-to-memory copy SYNOPSIS
#include <strings.h> int uucopy(const void *s1, void *s2, size_t n); DESCRIPTION
The uucopy() function copies n bytes from memory area s1 to s2. Copying between objects that overlap could corrupt one or both buffers. Unlike bcopy(3C), uucopy() does not cause a segmentation fault if either the source or destination buffer includes an illegal address. Instead, it returns -1 and sets errno to EFAULT. This error could occur after the operation has partially completed, so the contents of the buffer at s2 are defined if the operation fails. RETURN VALUES
Upon successful completion, uucopy() returns 0. Otherwise, the function returns -1 and set errno to indicate the error. ERRORS
The uucopy() function will fail if: EFAULT Either the s1 or s2 arguments points to an illegal address. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
bcopy(3C), attributes(5) SunOS 5.11 12 Sep 2006 uucopy(2)

Check Out this Related Man Page

bstring(3C)						   Standard C Library Functions 					       bstring(3C)

NAME
bstring, bcopy, bcmp, bzero - memory operations SYNOPSIS
#include <strings.h> void bcopy(const void *s1, void *s2, size_t n); int bcmp(const void *s1, const void *s2, size_t n); void bzero(void *s, size_t n); DESCRIPTION
The bcopy(), bcmp(), and bzero() functions operate as efficiently as possible on memory areas (arrays of bytes bounded by a count, not terminated by a null character). They do not check for the overflow of any receiving memory area. These functions are similar to the memcpy(), memcmp(), and memset() functions described on the memory(3C) manual page. The bcopy() function copies n bytes from memory area s1 to s2. Copying between objects that overlap will take place correctly. The bcmp() function compares the first n bytes of its arguments, returning 0 if they are identical and 1 otherwise. The bcmp() function always returns 0 when n is 0. The bzero() function sets the first n bytes in memory area s to 0. WARNINGS
The bcopy() function takes parameters backwards from memcmp(). See memory(3C). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
memory(3C), attributes(5), standards(5) SunOS 5.11 15 Apr 2002 bstring(3C)
Man Page

15 More Discussions You Might Find Interesting

1. HP-UX

please help need HP-UX 11 for PA RISC

Im not asking for an illegal copy (but from what i understand if i have the system its not illegal to give it to me) just how to get a copy of hp-ux period i have some old hp visualize systems based on the PA8500 400mhz cpu spent days on the phone with hp they no nothing and there website is a... (6 Replies)
Discussion started by: maliqua
6 Replies

2. Programming

segmentation fault

ive written my code in C for implementation of a simple lexical analyser using singly linked list hence am making use of dynamic allocation,but when run in linux it gives a segmentation fault is it cause of the malloc function that ive made use of????any suggestions as to what i could do??? thank... (8 Replies)
Discussion started by: rockgal
8 Replies

3. Linux

segmentation fault in socket application

helo, i m using linux operationg system at both client and server side. Now in my application when i use ntohl() then it will give segmentation fault. now when i remove nothl(), then it works fine. can u tell me why this happen. amit (8 Replies)
Discussion started by: amitpansuria
8 Replies

4. Programming

Why not a segmentation fault??

Hi, Why I don't receive a segmentation fault in the following sample. int main(void) { char buff; sprintf(buff,"Hello world"); printf("%s\n",buff); } If I define a buffer of 10 elements and I'm trying to put inside it twelve elements, Should I receive a sigsev... (22 Replies)
Discussion started by: lagigliaivan
22 Replies

5. Programming

Odd segmentation fault on Ubuntu only

Anyone as a clue why my program returns a segmentation fault on Ubuntu but not on Gentoo? I dumped the core and check the output through gdb. The whole program run fine all the way down and does what its suposed to do up till where its suposed to exit then it crash to segmentation fault instead... (4 Replies)
Discussion started by: Jess83
4 Replies

6. Programming

segmentation fault

Hi, I am having this segmentation fault not in the following program, bt. in my lab program . My lab program is horrible long so cannot post it here bt. I am using the following logic in my program which is giving the segmentation fault. Bt. if I run this sample program as it is it dosen't give... (3 Replies)
Discussion started by: mind@work
3 Replies

7. Programming

segmentation fault for extern

Why this is happening when both of them compiled together and run? I am getting segmentation fault SIGSEGV. File1.c: int arr; File2.c: extern int *arr; int main() { arr = 100; } (3 Replies)
Discussion started by: royalibrahim
3 Replies

8. Programming

segmentation problem with file

Hey guys I am reading a file in c that has a record like this: 1002:credit card:c:500.000000 2002:cred:d:200.000000 I am trying to read the file like this but I am getting a segmentation fault. Any ideas why? while (fscanf(fp1, "%d:%:%c:%lf\n",&accountnumb,mainname,&type,&transactionc) !=... (4 Replies)
Discussion started by: Joey12
4 Replies

9. Programming

segmentation fault.

This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b: int main() { mysqlpp::Connection conn(false); if... (3 Replies)
Discussion started by: sepoto
3 Replies

10. Programming

Multidimensional array of strings with vector.

I've been struggling with this for quite some time. I decided I should get some help with this. Nothing is working. I'm getting a segmentation fault or out of bounds error when I try to load the entries in the for loop.I'm really frustrated. :mad: Compiling isn't the problem. It's crapping out on... (5 Replies)
Discussion started by: sepoto
5 Replies

11. Programming

Unexplained segmentation fault

Hi, The following code reads 20 characters from one file and writes them (appends them) to the other file. The code works in Turbo C++ on windows but it shows segmentation fault on Linux. I am using Ubuntu 10.10 and gcc compiler. Please tell me where I was wrong. #include<stdio.h> void... (6 Replies)
Discussion started by: haritha.gorijav
6 Replies

12. Shell Programming and Scripting

Segmentation fault in Unix shell (linux OS)

Hi, I am trying to run an online downloaded tool but I am having an eror segmentation fault. ./multicoil test.seq Config file /home/kmohanas/MULTICOIL/multicoil_config window length 0 = 28 window length 1 = 28 multi_lib = 3 4 5 multi_lib = 2 3 4 pair_lib = 1 2 4 printfile =... (6 Replies)
Discussion started by: kaav06
6 Replies

13. Programming

Segment fault for C++ program when return vector

I am trying to reverse complement DNA sequence (string) with a short c++ code using boost library. Code was compiled without any warning/error, but ran into Segmentation fault. My guess is the function to return a vector, but not sure. #include <iostream> #include <fstream> #include <string>... (14 Replies)
Discussion started by: yifangt
14 Replies

14. Programming

C. To segmentation fault or not to segmentation fault, that is the question.

Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1... I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one. Below are two very condensed snippets of which I have added the results inside the each code section. IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies

15. Programming

Why does this example C code run and yet SHOULD either not compile or give a segmentation fault?

Apologies for any typos... Well guys, been researching 'goto' in C and they say that you can't 'goto' labels in another function as a segmentation fault will occur. However I have found a way to 'goto' a label in another function that is NOT main() using the asm() function. As you know I... (14 Replies)
Discussion started by: wisecracker
14 Replies