previous | start | next

The rlogind Example

typedef struct {
  int first;
  int second;
} fd_pair_t;

void rlogind(int r_in, int r_out, int l_in, int l_out) 
{
  pthread_t in_thread, out_thread;
  fd_pair_t in = {r_in, l_in};
  fd_pair_t out = {r_out, l_out};

  pthread_create(&in_thread, 0, incoming, (void *) &in);
  pthread_create(&out_thread, 0, outgoing, (void *) &out);
}


previous | start | next