Programming :: Open() Syscall Breaks Execve()'s Work?
Jul 16, 2010here is my working code :
Code: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
[code]....
here is my working code :
Code: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
[code]....
I had a doubt about the role of the evironment set in the execve() function of the C languange.
If I run something like
Code:
#include <stdio.h>
#include <unistd.h>
int main(void) {
[Code]....
What is the utility of setting the environment in the execve()?
Is there another way (not using chdir()) of changing the current directory before running exec()?
I had a problem that my write() syscall hangs up. The write is writing data to a file descriptor which is a slave pty.
The write executed inside a loop.
If the calling process passes me the virtual address of an its array for example, how can I access it without using copy_from_user?
View 2 Replies View RelatedWhen a application is ran from the shell:fork() is calledexecve() is calledI know the shell stats the file to make sure the required permissions are allowed in the child shell. But I can not find this in the man fork. Nor can I find this in man execve. Which one of these processes/calls stats the binary to be ran?
View 1 Replies View RelatedDear experts,I have a question about open() function of gcc3.4.6.I write a example:
Code:
using namespace std;
#include<iostream>
#include<fstream>
int main()
{
[Code].....
It can be compiled and ran.The statement file=txt_stream_file is in order to change char* to const char*. But open() function is not work,and out: can not open plots/results.txt The open() function of gcc3.4.6 is:
[Code]....
I start up the computer, I get the Grub menu, I see the user menu, I select the user and enter password, and then it just keeps loading forever and nothing else happens...
No gnome3 or any proper interface for that matter, just the wallpaper.
What's bothering me is that it happened for no apparent reason at all, one day it's good, the next it went bonkers.
I use Fedora 15 and gnome 3, my computer is HP Pavilion dv6736nr, I have a dual boot with Win7.
I know this has got to be a beginners question but I can not find the answer. I have searched the forum, the wiki, and the reference. I have used google and found the answer as it applies to red hat but doesn't work in debian. Found a couple of more but they didn't work either. I need to open a port for ssh to work. I have it working on 3 computers but the 4th has the port closed and I can't open it. I have openssh client and server installed and running. I am using Wheezy/testing on an acer laptop.
View 4 Replies View RelatedI keep getting sh can't open winetricks after inputting the code sh winetricks...
i have made the winetricks file able to run as an executable file, ive installed cabextract
What else do i need to do?
I installed openSUSE 11.3 on my notebook (lenovo 510i, Intel Centrino Wireless-N 1000).When I connect to my home wlan with WPA2 there is no problem, but when I try to connect to an open WLAN without encryption, the essid is not set (seen with iwconfig wlan0). If I set it after rcnetwork start wlan0 with iwconfig wlan0 essid the_open_sid, it associates and dhcp is working fine.
Here are the messages that are produced during rcnetwork start wlan0:
Code:
Jul 16 13:51:48 job2 ifplugd(eth0)[4740]: ifplugd 0.28 initializing.
Jul 16 13:51:48 job2 kernel: [ 5819.161280] e1000e 0000:00:19.0: irq 30 for MSI/MSI-X
Jul 16 13:51:48 job2 ifup: eth0 device: Intel Corporation 82577LM Gigabit Network Connection (rev 06)
code....
Is there a log with the wireless card setup commands that are used?
I've been using 10.04 for some time, but now Update Manager won't open, nor will Ubuntu Software. With all the apparent problems, I don't plan to upgrade to 10.10, but I do like to keep my OS updated and current.
View 9 Replies View RelatedStrange. After a recent update, I can no longer right click on a folder and open it as Administrator. I get this error message:
Unable to determine the program to run.
The item you selected cannot be open with administrator powers because the correct application cannot be determined.
I don't quite get this but why is it looking for a program to run? I only want to open a folder, not run a program. Anyway, I have done an uninstall and re-install of nautilus-gksu but that did not solve the problem. I have googled but no answers I could use.
Again, all I want to do is open a folder as Administrator so I can perform other operations that require root permission on files in that folder.
using: 10.04 LTS fully updated
I use Ubuntu Lucid Lynx. Sopcast player used to work properly, but from yesterday it does not open at all. It doesnt open when I click a link or even when I try to open from the menu.
View 9 Replies View RelatedTonight I replaced Ubuntu 10.04 with Kubuntu 10.10. While running Ubuntu 10.04 wireless worked fine and I had no problems. However, now with Kubuntu 10.10 I seem to be having a bit of a problem with the wireless. It will only connect to a wireless network that is 'open' (no security). It sees the network i want to connect to, but when i go to put in the correct security values it does nothing. Never seems to try to connect again. I've edited both the local Kubuntu wireless settings, as well as change settings on my router (went from WPA to WEP just to see if I could get it to work. It didnt).
So im wondering if there is any other software I could use to try to manage the local wireless hardware to see if different software will connect? Here is my iwlist, not that it helps but at least it proves my hardware sees the wireless i want to connect to.
[Code]...
I've been having trouble 'make installing' SoXt-1.2.2 on the server at work. I installed a fresh copy of Ubuntu 9.10 64 bit, I'm not sure what else to mention, besides the print out of the terminal, it's quite a lot. Also I tired to use Libtools, but then I stopped when I realised I had no idea what I was doing.
I can't upload it as "You are only allowed to post URLs to other sites after you have made 15 posts or more." I'm pretty certain there are no urls in it, so I've attached it.
I just love Linux! I am using Fedora 14 and just starting out. I am curious as to why is that when I click the Firefox icon to launch the internet from the menu bar a Linux terminal window has to be open. If I close that particular terminal, (which by the way says "Terminal" and does not show my chosen host name) Firefox closes. If I go to Applications, then Internet, then Firefox to launch the browser, the terminal doesn't open.
View 1 Replies View RelatedI've been learning C recently and have used Vim to write my code, however switching between tabs to compile and run annoys me so i was wondering if it would be possible to have a terminal in the bottom half of the screen inside vim. similar to most text editors.
View 1 Replies View Relatedjust click the [Computer] button at the left-bottom corner of the GNome desktop, the menu will shown, now press the printscreen button [PrtSc], nothing happen. no screenshot was made.or open any application , then click the menu like [file], let the menu list shown, then press [PrtSc] button, same thing, nothing happen.
View 8 Replies View RelatedI am trying to edit a postinfo.xsl in my root file dir, and with the command:
frank@linux-avnb:~> sudo gedit
(gedit:14150): Gtk-WARNING **: cannot open display: frank@linux-avnb:~>
I get the following. what am i doing wrong?
When I open a Word 2007 document using Open Office 3.1, the document is blank. I know OO 3.1 supports Word 2007 format. Any ideas why my document is blank in OO but when I open it in Word 2007 the text is there.
View 2 Replies View RelatedWhen I try to open Ubuntu software center, it appears on the process bar for about 10 seconds before it disappears. I can't get it to start.
I have tried alt+f2 and typing 'software-center', didn't help. I tried reinstalling ubuntu software center in Synoptic package manager, but I got this error message: "E: /var/cache/apt/archives/software-center_3.0.7_all.deb: subprocess new pre-removal script returned error exit status 1"
This started to happen after I reinstalled Ubuntu 10.10. After I did that, I got the 'modprobe: FATAL: Could not load /lib/modules/2.6.8.custem/modules.deb, no such
file or directory.' error. Could these two problems be related in any way?
I wish to start development for the open source projects. And going to start working on some project in C/C++ and shell/python scripts. I wish to know the best suitable development environment for this purpose? What about eclipse? I will be interacting with git, make and other open source utilities.
View 2 Replies View RelatedI refuse to use .net for any of my apps since I hate using proprietary code that wont work on other platforms without using emulation.
However, I do like how all the hard work is done for you and you can spend more time implementing, then actually coding stuff like socket classes, date/time classes and other wrappers to make the complex C/C++ code easier to use and tie with each other I have a custom library that I've been adding to as I need stuff, but then I got thinking, there must be something out there with everything I need to code applications, that is easy to use and more reliable and efficient then anything I'd ever make.
Does such framework exist?
I'm using C serial in a program to open and use a serial port but the port won't open for one reason or another. The program successfully runs on a different computer and when using RealTerm: Serial Capture Program, I can connect through the serial port with the same settings as I'm attempting through my c code. Anyone have any idea why it might be failing? I know this is still pretty vague, so let me know if there's other things I can tell you that might help to finding a solution
View 3 Replies View RelatedI created a dbf file via a code but the file does'nt seems to open.
Quote:
Code is running file and the file emaster.dbf and etran.dbftoo is created in the home directory but it does'nt opens(Libre Office 3 can't open it).
How to open the file.? I want to add information to the database file(Dbf) file. But until it opens how will I achieve my purpose?
I wanted to write the script which runs at startup and opens the terminal window the moment desktop screen appears(GNU linux).
View 3 Replies View Relatedi want to open and read /dev/pts/o file as a user how can i open? using normal fopen and fread functions? is it possible to open lik dat ? it der any alternate way to open and read the device files in ubuntu
View 6 Replies View Relatedi am creating program that gets 'key' string and directory path and finds if key string is present in any file under given path, everything seemed OK but when i put path like "/" after 5 mins i get error : Too many opened files. I've minimalized opened File object at the same time as much as posible, tried to call System.gc(),tried to close every stream every opened file, google but i still cannot search in bigger directories.
Algorithm (mine one is much bigger so i tried to make it as small as possible:
read 'path';
read 'key'(set as public);
#&
call method get('path') {
[Code]....
why I always get that runtime error ? (I need it to search hundreds of GB so when my 40GB partition do this what will bigger one do )
I have a problem with programming serial port lines. my issue is that i must toggle and read single lines like rts and cts. but my program stops at the line when i open the port. here my sampe:
Code:
int port;
int i;
port = open("/dev/ttyS0", O_RDWR);
[Code].....
when I start the program it hangs on the open-function. I have tried ps with grep for ttyS0 but there is nothig found. Why hangs this function and gives me no error?
If I use ttyS1, it works. where is the problem and why I can't get an error?
target is an embedded system with busybox.
How do I use bash to open a file, (file name as first parameter) cut n char from begin of each line, and write shortened lines to new file (outputfile name as the second parameter, n as the third parameter)
View 3 Replies View Related