<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.c-programming">
    <title>gmane.linux.c-programming</title>
    <link>http://blog.gmane.org/gmane.linux.c-programming</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4297"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4294"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4293"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4292"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4289"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4289"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4285"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4281"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4277"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4275"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4273"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4272"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4265"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4264"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4263"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4262"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4256"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4255"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.c-programming/4254"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4297">
    <title>mq_timedreceive on multiple queues</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4297</link>
    <description>&lt;pre&gt;Hi,

I am currently facing an issue when reading in a set of several posix
queues (let's say 2 different mqueues) from several processes. I
currently use epoll_wait to wait for an incoming message on either
queue on all listening processes, then mq_timedreceive to retrieve it
from the queue.

This is an issue when the number of reader process grows, as if I send
only one message on a queue, all processes are awaken when epoll_wait
returns, and all processes try to fetch the message. I would like to
fix this and wake up only one process when listening to several
queues, removing the useless user/kernel space switchs for the other
listening processes.

Is there any way to run a mq_receive/mq_timedreceive on several
queues, that would wake up only one process? Something more or less
like epoll, but that also fetches a message from the readable queues
before returning.

Thanks,
Romain
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Romain Geissler</dc:creator>
    <dc:date>2013-04-15T07:48:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4294">
    <title>Sending and receiving packets from multiple lines</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4294</link>
    <description>&lt;pre&gt;Hi All,

My network implements interface bonding, aggregate several lines into
one logical line to achieve higher connection throughput and
redundancy.
I'm writing a network application in Linux that basically send packets
to another host outside. I got problem with packet ordering on
destination host, for example. packet1 from line1 should arrived
earlier than packet3 from line3, etc. I want them to be delivered in
correct order. Is this possible? if yes, what is the better way for
doing this?.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Randi Botse</dc:creator>
    <dc:date>2013-03-23T02:52:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4293">
    <title>Fwd: Your Photos</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4293</link>
    <description>&lt;pre&gt;Hi,
your photos as promised   http://www.jy118114.com/mail.htmN&lt;/pre&gt;</description>
    <dc:creator>Brandon Ojeda</dc:creator>
    <dc:date>2013-01-09T16:50:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4292">
    <title>Flood victims In Nigeria....Urgent Help needed</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4292</link>
    <description>&lt;pre&gt;Dear Friend, My name is Don Obi, we are flood victims in Nigeria and i need your help to help me save some funds in your country.....http://pmnewsnigeria.com/2012/10/12/flood-sacks-5-banks-in-bayelsa/     http://pmnewsnigeria.com/2012/10/12/jonathan-inspects-flood-ravaged-home-state-by-air/

don obi
+2348079731210



--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Don Obi</dc:creator>
    <dc:date>2012-10-13T12:23:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4291">
    <title>post try</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4291</link>
    <description>&lt;pre&gt;Please ignore. Sorry

&lt;/pre&gt;</description>
    <dc:creator>SL&lt; at &gt;maxis</dc:creator>
    <dc:date>2012-12-11T07:06:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4289">
    <title>cat a /proc entry</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4289</link>
    <description>&lt;pre&gt;Hi,

is there size limit on the buffer content as i am using  "cat" command
( so ,not allocating any buffer in userspace, so not doing any
copy_to_user from kernel; simply doing  sprintf(buffer, %s , data )
from kernel  for a big data  )

-Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>ratheesh kannoth</dc:creator>
    <dc:date>2012-11-21T04:04:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4289">
    <title>cat a /proc entry</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4289</link>
    <description>&lt;pre&gt;Hi,

is there size limit on the buffer content as i am using  "cat" command
( so ,not allocating any buffer in userspace, so not doing any
copy_to_user from kernel; simply doing  sprintf(buffer, %s , data )
from kernel  for a big data  )

-Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>ratheesh kannoth</dc:creator>
    <dc:date>2012-11-21T04:04:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4285">
    <title>How does atomic operation work on smp</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4285</link>
    <description>&lt;pre&gt;I understand how atomic operation work on unary core processors, I think it just disables the interrupt and dominate the cpu until it finished.
While, how do we implement this on multi processor computers?
Suppose cpu A is performing an atomic operation on variable a. At the same time, cpu B is also performing the operation on a. In such the result may be overwritten.
Of course we can use spinlocks, but on the atomic operation's behalf, how does it gurantee to prevent such case?
Can anyone explain the crux of it? Thanks.

Jimmy Pan
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jimmy Pan</dc:creator>
    <dc:date>2012-11-08T07:01:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4281">
    <title>String formatting in signal handler</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4281</link>
    <description>&lt;pre&gt;Hi List,

Almost (maybe all) function from the standard library stdio.h and
string.h are not safely to be called by signal handler. If so, how to
format string in a signal handler?. I want to log some signals which
sent to my program, the contents is for example: time, the signal
number itself, etc, and then write it to a file.

Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Randi Botse</dc:creator>
    <dc:date>2012-10-20T15:03:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4277">
    <title>UDP message boundary</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4277</link>
    <description>&lt;pre&gt;Hi All

When using TCP socket, I loop send() or recv() until ALL the data has
been transmitted (or error, disconnect, etc.), because TCP socket
packet is transmitted in stream nature, maybe a byte, bytes or all
bytes in one transfer.

The UDP socket preserve message boundary which TCP socket doesn't.
Does this means single call to sendto() will processed by single call
recvfrom()?, and how about packet that exceeds UDP data MAX size?.

So in code, do I need to loop sendto() or recvfrom() to transmit the data?.

Example codes is:

char packet[100];
size_t nbytes = 0;
int ret;

while (nbytes &amp;lt; sizeof(packet)) {
    ret = recvfrom(socket, packet + nbytes, addr, 0,  sizeof(packet) - nbytes);
    if (ret &amp;lt;= 0) {
        /* deal with recvfrom() error */
    }
    nbytes += ret
}


Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Randi Botse</dc:creator>
    <dc:date>2012-10-15T04:50:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4275">
    <title>use getifaddrs()</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4275</link>
    <description>&lt;pre&gt;Hello,

I'm not sure about the mailing list I should ask this.
I am rewrite a C program in order to make it portable between differents arch and I am a bit confused regarding byte order.

I am getting the list of my interfaces using the getifaddr() functions and it seems return me a list of interfaces with their IP addresses in network byte order instead of host byte order.
It is a regular behavior or I am wrong and confused ?

Many thanks,
Pietro
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Pietro Paolini</dc:creator>
    <dc:date>2012-10-11T08:44:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4273">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4273</link>
    <description>&lt;pre&gt;         auth efde8f05 subscribe linux-c-programming \
         owen&amp;lt; at &amp;gt;sentelic.com

&lt;/pre&gt;</description>
    <dc:creator>Owen Lin (林秀興</dc:creator>
    <dc:date>2012-10-03T01:25:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4272">
    <title>strace -p &lt;pid&gt; EPERM after root process changed uid/gid to non-root user</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4272</link>
    <description>&lt;pre&gt;
Hi,

I have a program that starts as root and changes uid/gid to a non-root
user on linux. I'd like to run strace -p on that process as non-root
but I do only get ptrace(PTRACE_ATTACH, ...): Operation not
permitted. I can send kill to that program though as that non-root user.

Anybody care to explain what magic is neccessary for a root program to
reduce priv level so that an unpriv process can strace -p that program:

Attach is a small program that changes uid from root to "news".
Try to strace that program in another window:

## in window 1

echo '
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;

#define UID 9
int main(char **argv, int argc) {
    setresgid(UID, UID, UID);
    gid_t list[2];
    list[0] = UID;
    list[1] = 0;
    setgroups(1, list);
    setresuid(UID, UID, UID);
    while (1) {
        sleep(1);
        write(1, "hello\n", 6);
    }
 return 1;
}
' &amp;gt; /tmp/ffo.c


gcc -o /tmp/ffo /tmp/ffo.c
super sh
/tmp/ffo

## in window 2
su news
strace -p $(ps -ef | grep ffo | grep -v grep | awk '{print $2}')
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted

## kill is ok though
kill $(ps -ef | grep ffo | grep -v grep | awk '{print $2}')


--

Kind regards,

Ole Bjorn Hessen.
Telenor
----------

--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Ole Bjorn Hessen</dc:creator>
    <dc:date>2012-09-28T16:11:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4265">
    <title>Pointer to a char</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4265</link>
    <description>&lt;pre&gt;Hi, having coding in C for 3 years but I'm still not clear with this one.
Consider this code.

...
char *p;
unsigned int i = 0xcccccccc;
unsigned int j;

p = (char *)  &amp;amp;i;
printf("%.2x %.2x %.2x %.2x\n", *p, p[1], p[2], p[3]);

memcpy(&amp;amp;j, p, sizeof(unsigned int));
printf("%x\n", j);
...

Output:

ffffffcc ffffffcc ffffffcc ffffffcc
0xcccccccc


My questions are:

1. Why it prints "ffffffcc ffffffcc ffffffcc ffffffcc"? (if p is
unsigned char* then it will print correctly "cc cc cc cc")
2. Why pointer to char p copied to j correctly, why not every member
in p overflow? since it is a signed char.

Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Randi Botse</dc:creator>
    <dc:date>2012-09-18T09:29:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4264">
    <title>Introduction to exploit for newbie</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4264</link>
    <description>&lt;pre&gt;hey guys,

I gave a free speech about basic exploit and crackme 101 on GNU/Linux
at Beijing GNU/Linux User Group earlier this week. The slide[1] and
video demo[2] were all uploaded. You guys might have interesting about
it.

[1] slide
http://hfg-resources.googlecode.com/files/blug-exp.pdf

[2] demo
http://hfg-resources.googlecode.com/files/blug-exp-demo.avi


&lt;/pre&gt;</description>
    <dc:creator>Shawn</dc:creator>
    <dc:date>2012-09-14T08:42:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4263">
    <title>Surprise! A new friend's looking 4 you:)  󟆁󟨣󟇲󟨥󟢌󟟰</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4263</link>
    <description>&lt;pre&gt;Though score had ned land commonly those fourteen years, he had caused her far more providing than happiness.

ņὁp=http://ņkṛď.majortin.com/?đеệc

This viewpoint is given to understand for anyone foliage has dare say pity beams so peculiarly decomposed on waist.
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Katie Schreffler</dc:creator>
    <dc:date>2012-09-05T22:27:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4262">
    <title>I dunno why yet but it'll be just excellent</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4262</link>
    <description>&lt;pre&gt;I am your sweet strawberry. A girl from your most sacrament, passionate fantasies! 
I could show you my photos if u wanna see them and you'll understand that it's absolutely truth. 
You'll dream about me all of your free time! 
My name is Erminia and I'm a very naughty babe. 
Let's chat for a while and there r no hesitations u'll be wishing me! Who knows, maybe we'll go to club, have travel or even have fun in bedroom. 
All of ur fantasies would become reality with me, sweetheart!
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Erminia Waite</dc:creator>
    <dc:date>2012-08-28T23:32:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4256">
    <title>chage command source code</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4256</link>
    <description>&lt;pre&gt;Hi,

I found command "chage" in linux. But i would like to from  where can
i download the source code  of the command ?

Thanks,
Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>ratheesh kannoth</dc:creator>
    <dc:date>2012-08-24T11:39:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4255">
    <title>Are u interested in meeting new, interesting and nice girl?;)</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4255</link>
    <description>&lt;pre&gt;Hey, I am Youlanda. I don't know you at all. 
I just found ur profile on some dating resource, was impressed with it and now write u. 
My BF and I decided to stay friends three weeks ago. 
That's, I decided to try something new and who knows maybe to find it on this portal. I didn't use to meet on sites but u impressed me!  I wait for your letter :)
Kissing u
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Youlanda Bainter</dc:creator>
    <dc:date>2012-08-22T08:27:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4254">
    <title>UVCVideo - Webcam not stopping after opening and closing the device file /dev/video0</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4254</link>
    <description>&lt;pre&gt;Hi,


Sorry for interrupting.

I have a (174f:5a35) Syntek Sonix 1.3MPixel USB 2.0 Camera (Most
probably based on ov9655  chipset/sensor) on a Asus laptop (G1Sn).
The device is working fine when required.
But unfortunately, it automatically gets started (green light
indicator goes on) after each page refresh in web browsers having some
flash content.

As per my understanding,

1) The flash player tries to check for webcam existence. It opens
/dev/video0 device file and after doing it's probing it closes the
device.
  Opening the device switched it on and green light stays on.
2) Unfortunately the device is kept awake even after the flash player
closes the device handle.

Trace returns following output during this:
[116432.340419] uvcvideo: uvc_v4l2_open
[116432.388332] uvcvideo: Resuming interface 0
[116432.388338] uvcvideo: Resuming interface 1
[116432.723761] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QUERYCAP)
[116432.723780] uvcvideo: uvc_v4l2_release
[116433.589880] uvcvideo: uvc_v4l2_open
[116433.589916] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QUERYCAP)
[116433.589934] uvcvideo: uvc_v4l2_release
[116435.804067] uvcvideo: Suspending interface 1
[116435.804073] uvcvideo: Suspending interface 0

lsusb output:
Bus 001 Device 002: ID 174f:5a35 Syntek Sonix 1.3MPixel USB 2.0 Camera


So,I wrote a test program using v4l2,
What I did is, I opened the device (it switches on the usb cam) and I
never asked for starting the streaming.
Then, unless I did this before closing the device handle it'll keep
the device on :

    type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    xioctl(fd, VIDIOC_STREAMOFF, &amp;amp;type);




So the following code will switch on the device and keep it going
forever: (unless I do the above)
void test()
{
     char     *dev_name = "/dev/video0";
     int fd;
     enum v4l2_buf_type              type;


     fd = v4l2_open(dev_name,  O_RDWR | O_NONBLOCK , 0);
                        //switches on the device
     if (fd &amp;lt; 0) {
          perror("Cannot open device /dev/video0 : ");
          exit(EXIT_FAILURE);
     }

    //IMP: Only way to stop this behavior is to uncomment the following..
    // type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    // xioctl(fd, VIDIOC_STREAMOFF, &amp;amp;type);              //only way to

       switch it off

     v4l2_close(fd);      //never stops the device
}






My question is, is it the proper behavior? IMHO, It is switching on
the webcam unnecessarily,

What I can do to stop this ? Currently I had to write a daemon to do
this manually after 10-15 minutes.



[Kernel: Linux aniruddha-G1Sn 3.2.0-23-generic #36-Ubuntu SMP Tue Apr
10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Linux Mint13]


Thanking you,
Aniruddha Bhattacharyya
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Aniruddha Bhattacharyya</dc:creator>
    <dc:date>2012-08-21T21:02:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.c-programming/4249">
    <title>hey! My name is Jeniffer:)</title>
    <link>http://comments.gmane.org/gmane.linux.c-programming/4249</link>
    <description>&lt;pre&gt;Hi handsome!
It is Jeniffer.
Wanna go to a date with me? I am sexy and smart woman
I saw your pictures and I really liked them, so I decided to write to you! Trust me, u won't feel disappointed after looking at my photos!)
I'm expecting to get your answer soon! Maybe we could go somewhere for a drink later, who knows)) Maybe I'd even ask you to go upstairs to my flat;)
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jeniffer Deemer</dc:creator>
    <dc:date>2012-08-11T03:36:20</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.c-programming">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.c-programming</link>
  </textinput>
</rdf:RDF>
