07-16-2008
Uh oh... best being moved/posted in High level programming subforum next door I guess (if no answer comes).
8 More Discussions You Might Find Interesting
1. Programming
Dear all,
In my code,i am planning to use memset function to re-initialise an array before populating it everytime. Will using memset function be an overload to the program? (3 Replies)
Discussion started by: ranj@chn
3 Replies
2. UNIX for Dummies Questions & Answers
HI all ,
please find the piece of code below
char *t;
char *f;
char buf;
memset(buf,0,50);
after that i am assigning memory
for (i=0; i<100; i++)
{
t = buf+(i*6);
f = "ARUN";
}
my question ..
1) i have run this it is... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies
3. Solaris
Hi All,
we have an application that is written in 'C' programming to connects to various servers in the organization.
The bellow code establish a TCP connection to connect to the remote servers. the application works perfectly ok, but, after some time the entire process get's crashed and... (2 Replies)
Discussion started by: sudharma
2 Replies
4. Programming
Hi guys,
my tool works fine in gentoo, ubuntu now im trying to port it to windows but bzero/bcopy I read aren't working on windows and for better portability I should of use memset() so im trying to translate
bzero(buffer,256);in
printf("MAIL TO");
strcpy(buffer, rcp);
... (4 Replies)
Discussion started by: Jess83
4 Replies
5. Programming
Hello all,
I have a confusion with calloc function :
wz. the difference between the following 2 statemnts:
char *ptr;
char = (char*)calloc(num, sizeof(char));
char = (char*)calloc(num, sizeof(char*));
Am really confused!!!!!
---------- Post updated at 09:32 AM... (1 Reply)
Discussion started by: mind@work
1 Replies
6. Programming
Whilst creating the function readjust_descr I have stumble across what may be a problem or
something that might just work. I was hoping someone could look at the code below and tell me
if readjust_descr will clear all null pointers from the structure descr_list.
struct descr descr_list =... (6 Replies)
Discussion started by: Errigour
6 Replies
7. Programming
Hi , experts.
I work on Linux station (RedHat 5.7), regular user, but have root password.
%> uname -a
Linux ran1log06 2.6.18-238.1.1.el5 #1 SMP Tue Jan 4 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
%> cat /etc/issue
Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Kernel \r on... (5 Replies)
Discussion started by: baruchgu
5 Replies
8. Emergency UNIX and Linux Support
Hi,
memset call is failing on solaris for me. I wrote below code and that also fails. Any hints?
void *memset(void *dst, int c, size_t n)
{
if (n) {
char *d = dst;
do {
*d++ = c;
} while (--n);
}
return dst;
} (2 Replies)
Discussion started by: skyineyes
2 Replies
LEARN ABOUT X11R4
door_revoke
door_revoke(3DOOR) Door Library Functions door_revoke(3DOOR)
NAME
door_revoke - revoke access to a door descriptor
SYNOPSIS
cc -mt [ flag ... ] file ... -ldoor [ library ... ]
#include <door.h>
int door_revoke(int d);
DESCRIPTION
The door_revoke() function revokes access to a door descriptor. Door descriptors are created with door_create(3DOOR). The door_revoke()
function performs an implicit call to close(2), marking the door descriptor d as invalid.
A door descriptor can only be revoked by the process that created it. Door invocations that are in progress during a door_revoke() invoca-
tion are allowed to complete normally.
RETURN VALUES
Upon successful completion, door_revoke() returns 0. Otherwise, door_revoke() returns -1 and sets errno to indicate the error.
ERRORS
The door_revoke() function will fail if:
EBADF An invalid door descriptor was passed.
EPERM The door descriptor was not created by this process (with door_create(3DOOR)).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |all |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
close(2), door_create(3DOOR), libdoor(3LIB), attributes(5)
SunOS 5.10 21 Aug 1997 door_revoke(3DOOR)