difference of pid_t and int in C [duplicate]










0















This question already has an answer here:



  • pid_t (and similar types) - why, just why?

    6 answers



what's the difference between pid_t datatype and int when getting process id?
I saw something like:



pid_t getpid(void);


but whats the difference between it and



int getpid(void);









share|improve this question













marked as duplicate by Antti Haapala c
Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 '18 at 6:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















    0















    This question already has an answer here:



    • pid_t (and similar types) - why, just why?

      6 answers



    what's the difference between pid_t datatype and int when getting process id?
    I saw something like:



    pid_t getpid(void);


    but whats the difference between it and



    int getpid(void);









    share|improve this question













    marked as duplicate by Antti Haapala c
    Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

    StackExchange.ready(function()
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function()
    $hover.showInfoMessage('',
    messageElement: $msg.clone().show(),
    transient: false,
    position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
    dismissable: false,
    relativeToBody: true
    );
    ,
    function()
    StackExchange.helpers.removeMessages();

    );
    );
    );
    Nov 12 '18 at 6:19


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















      0












      0








      0








      This question already has an answer here:



      • pid_t (and similar types) - why, just why?

        6 answers



      what's the difference between pid_t datatype and int when getting process id?
      I saw something like:



      pid_t getpid(void);


      but whats the difference between it and



      int getpid(void);









      share|improve this question














      This question already has an answer here:



      • pid_t (and similar types) - why, just why?

        6 answers



      what's the difference between pid_t datatype and int when getting process id?
      I saw something like:



      pid_t getpid(void);


      but whats the difference between it and



      int getpid(void);




      This question already has an answer here:



      • pid_t (and similar types) - why, just why?

        6 answers







      c types process






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 5:38









      amjadamjad

      3719




      3719




      marked as duplicate by Antti Haapala c
      Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Nov 12 '18 at 6:19


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by Antti Haapala c
      Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Nov 12 '18 at 6:19


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Quoting from the libc manual:




          The pid_t data type is a signed integer type which is capable of
          representing a process ID. In the GNU C Library, this is an int.







          share|improve this answer




























            0














            data types that ends with "_t", are usually a defined type variable in C and C++ as an unwritten law.
            according to that law, "pid_t" is a data type which is defined somewhere else but "int" a standard type; so to know the differences you need to know how "pid_t" is defined.






            share|improve this answer




















            • defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
              – Majid Roustaei
              Nov 12 '18 at 5:51

















            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Quoting from the libc manual:




            The pid_t data type is a signed integer type which is capable of
            representing a process ID. In the GNU C Library, this is an int.







            share|improve this answer

























              1














              Quoting from the libc manual:




              The pid_t data type is a signed integer type which is capable of
              representing a process ID. In the GNU C Library, this is an int.







              share|improve this answer























                1












                1








                1






                Quoting from the libc manual:




                The pid_t data type is a signed integer type which is capable of
                representing a process ID. In the GNU C Library, this is an int.







                share|improve this answer












                Quoting from the libc manual:




                The pid_t data type is a signed integer type which is capable of
                representing a process ID. In the GNU C Library, this is an int.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 '18 at 5:45









                babonbabon

                1,9291314




                1,9291314























                    0














                    data types that ends with "_t", are usually a defined type variable in C and C++ as an unwritten law.
                    according to that law, "pid_t" is a data type which is defined somewhere else but "int" a standard type; so to know the differences you need to know how "pid_t" is defined.






                    share|improve this answer




















                    • defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                      – Majid Roustaei
                      Nov 12 '18 at 5:51















                    0














                    data types that ends with "_t", are usually a defined type variable in C and C++ as an unwritten law.
                    according to that law, "pid_t" is a data type which is defined somewhere else but "int" a standard type; so to know the differences you need to know how "pid_t" is defined.






                    share|improve this answer




















                    • defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                      – Majid Roustaei
                      Nov 12 '18 at 5:51













                    0












                    0








                    0






                    data types that ends with "_t", are usually a defined type variable in C and C++ as an unwritten law.
                    according to that law, "pid_t" is a data type which is defined somewhere else but "int" a standard type; so to know the differences you need to know how "pid_t" is defined.






                    share|improve this answer












                    data types that ends with "_t", are usually a defined type variable in C and C++ as an unwritten law.
                    according to that law, "pid_t" is a data type which is defined somewhere else but "int" a standard type; so to know the differences you need to know how "pid_t" is defined.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 12 '18 at 5:45









                    Majid RoustaeiMajid Roustaei

                    4610




                    4610











                    • defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                      – Majid Roustaei
                      Nov 12 '18 at 5:51
















                    • defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                      – Majid Roustaei
                      Nov 12 '18 at 5:51















                    defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                    – Majid Roustaei
                    Nov 12 '18 at 5:51




                    defined types are usually used to make the code more clear. using them also makes it more easier to change the code.
                    – Majid Roustaei
                    Nov 12 '18 at 5:51



                    Popular posts from this blog

                    How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

                    Syphilis

                    Darth Vader #20