Programming :: Put Lock Between To Programs
May 3, 2011
i have two c++ programs, first one captures network packet from eth interface and save it in a file, second one uses this generated file for its purposes, data stream always exists then first program should always be running, although second program cannot read the file while the first program is writing in it, then i need to define a lock which can be checked by both progs before read/write, how is it possible to define this kind of lock in linux?
View 5 Replies
ADVERTISEMENT
May 31, 2011
I'm trying lo lock a file (not using the chmod). This is the code I generated, but even locking the file I still can read and write the file from another process. (I'm working on a ubuntu 10.10, kernel 2.6.35-22-generic #35-Ubuntu SMP)
[Code].....
View 2 Replies
View Related
Apr 14, 2011
I have a program that uses both Pthreads and OpenMP. Basically, 2 threads (Thread A and B) are created using Pthreads to do work, and in Thread A, OpenMP is used to parallelize a for loop.If I have a global variable that is accessed by the OpenMP threads and also Thread B, can I use the lock in OpenMP to ensure I have no race conditions?
View 2 Replies
View Related
Apr 16, 2010
I need a module that flash Caps-Lock led. Is it possible to use outb() function here for sending data to keyboard via port 0x64 ?
View 2 Replies
View Related
Nov 22, 2010
I just downloaded OpenOffice 3.2.1 from the openoffice.org weebsite. I followed the instructions precisely and everytime ended up in the same error message - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. I am using Fedora 13.
View 2 Replies
View Related
Mar 25, 2010
When i connect windows server 2003 from ubuntu these error displayed .When i installing the tsclient, by executing these following command from a Terminal window:
sudo apt-get install tsclient
When i run these command the following error displayed.
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
View 1 Replies
View Related
Sep 14, 2010
I have a HP Pavilion dv4 that is 4 months old. Yesterday it suddenly seemed to restart then once I logged in it turned off. When I tried to turn it on some of the lights came on and the caps lock and num lock started flashing. Since then I have not been able to get it to work correctly.It once seemed to turn on but died again after the login window.I tried to use my live cd but the same thing happened. It started loading once, but then shut down again. Every other time it stayed dead minus the lights
View 1 Replies
View Related
Jun 12, 2011
I recently installed Ubuntu 11.04 on an old Sony Vaio laptop. I was following some of the steps here..[url]
The step "Enable Full DVD Playback(Dual Layer DVD Support)" did not finish correctly doh and now I can't use 'sudo apt-get' for anything or the software center or using the 'Update Manager' does not work.
The update manger says it may be caused by an update not finishing correctly which sounds correct as explained above. The apt-get command gives me back the following....'Could not get lock /var/lib/dpkg/lock resource temporarily unavailable' 'unable to lock administration directory /var/lib/dpkg is another process using it?'
I tried the obvious restart but that hasn't worked.
View 6 Replies
View Related
Feb 25, 2010
my problem is the terminal:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/) , are you root?
View 2 Replies
View Related
Apr 3, 2010
I have pidgin2.5.2. I want to install pidgin2.6.6.How can I do that?E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
View 1 Replies
View Related
May 2, 2010
There is a very strange problem I've been having. When I enable either Caps Lock or Num Lock the media controls on my keyboard cease to work. I have Googled this one to death but found nothing. This problem existed in Xubuntu 9.10 and now still exists in Xubuntu 10.04. The keyboard I use is a Logitech Elite Keyboard. I would love to be able to use the Caps Lock and Num Lock without the worry that I am disabling the media controls
View 4 Replies
View Related
May 27, 2010
I have just burned the latest CD using infraRecorder, as per the instructions on this site, however when I boot from this CD, it spends about 5 minutes moving the red balls across my screen, then all of the sudden it just freezes, and my caps and scroll lock lights start to blink. I've had a look in the forums already but there's nothing about this happening on Boot of the live CD.
View 6 Replies
View Related
Jun 23, 2010
I'm wondering why the num lock doesn't work in Ubuntu anymore? When you press the "num lock" key, you're supposed to be able to input the numbers along with + - * / and decimal point. When I press num lock and try typing numbers, nothing happens.
I've done a google search and this is a well known problem that nobody has fixed. In Windows it's never a problem.
Seems such a shame that the great Ubuntu and Linux are so good for stability and speed, but can't get a simple num lock working.
View 9 Replies
View Related
Oct 31, 2010
I am having a very annoying problem with my laptop.I am experiencing many freezes.When my laptop freezes, it shows the caps lock and scroll lock lights blinking.At first I thought it was a problem with flash (here is original thread: URL... )In the original thread, I thought the freeze's were being caused by the flashplayer, but it apparently isn't the case.The last time I experienced the freeze, I was playing around with the compiz desktop effects.
View 4 Replies
View Related
Mar 2, 2011
If multiple threads operate on a single shared resource, we can lock it using pthread_mutex_lock. Uptill that it is fine, but why again pthread_cond_wait?
int shared=0; // global
.
.
// Thread 1
pthread_mutex_lock(&mutex);
shared=1;
pthread_mutex_unlock(&mutex);
When thread1 invokes the mutex lock, no other threads can access it in parallel. So why again and what for we use, pthread_cond_wait( ).
View 2 Replies
View Related
Nov 29, 2010
I've always thought that the idea was very cool, but I get restricted by the way distros think that "httpd" and the like are the only things that should go into a runlevel - I mean Fedora doesn't even let you turn off the GUI!I want to do some lower-level hacking than that, so can someone help me?
View 1 Replies
View Related
Aug 16, 2010
Lately I sometimes get the error message:
Code:
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the download directory
when I try to update. I get this using both the Update Manager or using
Code:
sudo apt-get update
sudo apt-get upgrade
View 6 Replies
View Related
Nov 22, 2010
So I was reading one of the Unix Philosophy rules by Eric Raymond:# Rule of Composition:Design programs to be connected to other programs.How does one achieve that? I know one could several C programs and then use a bash script to feed in the stdin, but how do you do that with just pure C, do you do it with pipelines?
View 2 Replies
View Related
Feb 16, 2011
wants to do miniproject as part of the academic curriculum using Computer graphics on Linux using C or C++. Can any one direct me to a direction how i can proceed. I know basics of C and C++
View 9 Replies
View Related
Jul 25, 2010
I know this may be just me being a little bias on OS's but... I quite honestly believe that "some" programs run faster on linux than on windows.
Open Office for example, It runs amazingly fast on my linux distro but runs horribly (laggy) on my Vista machine.
Firefox also appears to run faster on my linux machine than on my Vista machine.
There are several more examples but I could go on and on with this.
My point is, do programs run faster on linux than on windows? Or is it just me that is in denial?
I am not sure if comparing linux to Vista is a good comparison in terms of program speed or not...
Also it should be noted that the Vista machine "hardware" is "several" times faster than my linux machine's "hardware".
I am not trying to start a flame war or anything like that, I am just trying to make sure I haven't totally lost my mind.
View 7 Replies
View Related
Mar 15, 2009
I work on Fedora 9 and I'm unable to compile my c++ program using the make in the terminal as well as in the IDE-Anjuta.although 'make' works fine with C programs,I get an error that g++ command is not found whenever I try it with C++ programs.
View 3 Replies
View Related
Jul 16, 2010
I am working on a program called writemusic that creates a file of structures representing musical glyphs (notes, rests, barlines, etc). Another program called Printmusic then reads this file and writes out the music as a PNG image which can be printed. I had noticed that the final barline was always duplicated and I wanted to know which program was resonsible, so I tried some experiments:
1). I created a file in writemusic and ran it through printmusic, leaving writemusic running. As I expected there were two barlines at the end. I went back to writemusic and added a couple of bars. Now the duplicate barline had vanished to reappear at the new end.
2) I created two files and concatenated them with cat. When I processed this composite file with printmusic each of the two sections ended with a double barline.
3) I created a file with writemusic, closed the program, relaunched it and reloaded the same file (writemusic allows you to do this). Then I added a few bars. When printmusic had processed this augmented file, there were three barlines at the end of the first section and two at the end of the second.
The results for 2) and 3) only make sense if writemusic is actually putting these duplicates into the file, but the result for 1) suggests that printmusic is doing it when the file is read back.
View 6 Replies
View Related
Apr 20, 2011
I ran into an inconsistency in handling timers (VTALRM) between AMD and intel platforms with threads. My understanding was that the timers are per process. I discovered I must call setitimer in the thread on intel though. AMD allows me to make the setitimer call once in the main thread as expected. The code below demonstrates the issue. I must add the code in the INTEL define for it to work properly on intel cpu's. Am I missing something dumb??
[Code]...
View 4 Replies
View Related
Aug 18, 2009
Well I have been interested in programming for a while, and just found out about Linux and Unix. I started out with Java, but now I know I bunch: Flash, C++, C and others. I was working on a mac so I made a few flash games then started to work on iPhone games. I was board one day and I found out about Unix and I thought that would be something else to try.So in an attempt to learn about Unix I have been reading different articles about it, and have heard of using different languages in one program. The article I was reading didn't give any examples, and it assumed the reader has programmed Unix before.
So how do you write programs in multiple languages, which languages would you use, and why would you want to do that?
View 3 Replies
View Related
Oct 28, 2010
A thread-aware version of gdb receives a system notification when a thread starts in the app it is debugging. GTK+ has hidden threads associated with loading icons into menus. So trying to debug a GTK+ program, even one that is apparently single-threaded, can produce a deadlock between gdb, the app and XWindows. The app (actually GdkPixbufLoader) grabs the focus, the mouse and the keyboard and then starts a thread when a menu is opened. If gdb has trouble with threads, it leaves the app blocked but still holding the mouse, et. al. Then you can't talk to gdb or any other GUI interface. To make gdb happy, all GTK+ apps need to be linked with -pthread, if you have the source. If not, gdb cannot be used. In order to break the deadlock, you need a non-GUI shell. If your /etc/inittab starts agetty, mingetty, or the like, and you can get to it with <CRTL><ALT><F3...F6>, you can do a kill -KILL <pid> on the offending app, recover and then go back to XWindows with <CTRL><ALT> <F1/F2>. Otherwise it's reboot time.
View 3 Replies
View Related
Nov 5, 2010
i am trying to do something very simple like a header and a footer for my first perl programs, what iam trying to do is that when i create a file in vim: lets say hello.pl , i would like that file to have already this in its header:
#!/usr/bin/perl
and this on the footer:
print "
";
so that i dont have to type everytime #!/usr etc i tried to do it this way but i get weird vim errors: header is a file that contains the header and footer $ vim hello.pl;header > is there another way to do it as a function in bash or some other one liner command?
View 1 Replies
View Related
Sep 10, 2010
I'm new to database programming but I'm working in a project that makes use of sqlite3. I know I should #include <sqlite3.h> but it is not there.... i have just sqlite.h. can anyone tell me what to do to have the sqlite3 headers and start using them in my programs
View 9 Replies
View Related
Nov 17, 2008
I would like to know the Tools which are used for Testing the performance of C and C++ programs under linux?
View 4 Replies
View Related
Jul 22, 2014
I am trying to replicate what is happening on this page under the tcsh shell, but using the bash shell found in Wheezy. Here is the page I am referring to:[URL] The command I am trying to replicate is on page 6 under figure 2.4. The command is "prompt> ./mem &; ./mem &".
I would like to run the same program twice, concurrently, but do not know how. Note that I am not trying to use a bash script, but rather by simply using syntax on the command line.
View 4 Replies
View Related
Feb 19, 2011
I was wondering about a package that can be used to write and compile/run programs in different programming languages. I was also wondering how possible it is to program in Visual Basic 2010 in openSUSE if at all.
View 9 Replies
View Related