Sponsored Content
Full Discussion: Create a database in C
Top Forums Programming Create a database in C Post 302560285 by Errigour on Thursday 29th of September 2011 10:59:49 AM
Old 09-29-2011
Create a database in C

Hey, I have this basic server thing going on and I can't seem to allocate
memory correctly and I can't access the memory after I allocated it. I
was hoping people might suggest methods of doing this. I was thinking of
using the socket file descriptor to reference the users.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

trying to create a virtual database..

:cool: I like Vibhory2 like the idea of tapping into the kernel.. although not as indepth as he/she... i want to create a virtual databse of a few ma chines with connectivity and defiinte knowledge to create it.. I havebeen working on the project for a year now.. ! before unix (1 year exactly) i... (20 Replies)
Discussion started by: moxxx68
20 Replies

2. UNIX for Advanced & Expert Users

create database on unix

how can i create database on unix from command line (without using DBCA) (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies

3. Solaris

Can't create database after Oracle Database installation

I installed Oracle 10 software on Solaris 11 Express, everything was fine execpt I can't create database using dbca.rsp file. I populated file with following options. OPERATION_TYPE = "createDatabase" GDBNAME = "solaris_user.domain.com" SID = "solaris_user" TEMPLATENAME = "General... (0 Replies)
Discussion started by: solaris_user
0 Replies

4. Shell Programming and Scripting

Create database using Backup file

Hi, I have backup file of database in my server. I want to create a that database in the same Mysql Server. How can I do that? Please send the steps to create the database using backup file? Thanks a lot, (1 Reply)
Discussion started by: aish11
1 Replies

5. Programming

Creating a bash script that create/open database

Hi. I have two text files(tables) which include some information and I want to make some query codes using them. First of all, I want to create bash script that read this two tables, create/open database and insert data from files into database. #!/bin/bash while read line; do ... (1 Reply)
Discussion started by: rlaxodus
1 Replies

6. UNIX and Linux Applications

Really simple shell script to create oracle database

Hello , I am new in this forum and need your help as I am totally confused :confused: I read a lot of threads and tried to search a lot but did not get the exact answer to my question. I just want a simple (content wise may be long) shell script to create oracle database. In detail:... (5 Replies)
Discussion started by: rahoolm
5 Replies

7. Shell Programming and Scripting

Help with script to create users from database query

#!/bin/bash user=`mysql userList -uuserlist -puserlistpassword -s -N -e "SELECT userName FROM users WHERE activated='n'"` for i in $user; do useradd "$i" -m doneThis is what I have done so far. But obviously it still does not work. I'm trying to create users based on information stored in a... (5 Replies)
Discussion started by: bucketuk
5 Replies

8. UNIX for Dummies Questions & Answers

Create Alert for Database Problem

Hi all, I new to scripting and i need to know how to put the script when the capture goes down in the feeds database.. I tried with this "ps -ef | grep asn" command and it displaying the capture,apply time. But the alert we are receving now is replication is failed . So i need to develop the... (1 Reply)
Discussion started by: g.nanthagopal
1 Replies

9. AIX

Need a graphical interface on AIX server to create database

Hello, Please suggest me the ways how to get graphical interface on AIX server.I need to create oracle database for which I need graphical access. Best regards, Vishal (4 Replies)
Discussion started by: Vishal_dba
4 Replies

10. Shell Programming and Scripting

awk parsing file to create a database

Hi Guys, I have a list a hotels stored in many different text files. This list is kept in the following format: 20/03 Hotel: The Bear Hotel Honey Street Woodstock UK Tel:+44-xxxxxx Rate: 100 21/03 Hotel: The Bush Hotel Nice Street Farnham (4 Replies)
Discussion started by: freddie50
4 Replies
getpeerucred(3C)					   Standard C Library Functions 					  getpeerucred(3C)

NAME
getpeerucred - get connected socket/STREAM peer's credentials SYNOPSIS
#include <ucred.h> int getpeerucred(int fd, ucred_t **ucred); DESCRIPTION
The getpeerucred() function returns the credentials of the peer endpoint of a connection-oriented socket (SOCK_STREAM) or STREAM fd at the time the endpoint was created or the connection was established. A process that initiates a connection retrieves the credentials of its peer at the time the peer's endpoint was created. A process that listens for connections retrieves the credentials of the peer at the time the peer initiated the connection. When successful, getpeerucred() stores the pointer to a freshly allocated ucred_t in the memory location pointed to by the ucred argument if that memory location contains the null pointer. If the memory location is non-null, it will reuse the existing ucred_t. When ucred is no longer needed, a credential allocated by getpeerucred() should be freed with ucred_free(3C). It is possible that all fields of the ucred_t are not available to for all peer endpoints and all callers. RETURN VALUES
Upon successful completion, getpeerucred() returns 0. Otherwise, it returns -1 and errno is set to indicate the error. ERRORS
The getpeerucred() function will fail if: EAGAIN There is not enough memory available to allocate sufficient memory to hold the user credential. The application can try again later. EBADF The fd argument is not a valid file descriptor. EFAULT The pointer location pointed to by the ucred_t ** argument points to an invalid, non-null address. EINVAL The socket is connected but the peer credentials are unknown. ENOMEM The physical limits of the system are exceeded by the memory allocation needed to hold the user credential. ENOTCONN The socket or STREAM is not connected or the STREAM's peer is unknown. ENOTSUP This operation is not supported on this file descriptor. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
door_ucred(3DOOR), ucred_get(3C), attributes(5), connld(7M) NOTES
The system currently supports both sides of connection endpoints for local AF_UNIX, AF_INET, and AF_INET6 sockets, /dev/tcp, /dev/ticots, and /dev/ticotsord XTI/TLI connections, and pipe file descriptors sent using I_SENDFD as a result of the open of a named pipe with the "connld" module pushed. SunOS 5.10 26 May 2004 getpeerucred(3C)
All times are GMT -4. The time now is 05:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy